Download the PHP package pschocke/laravel-telegram-login-widget without Composer
On this page you can find all versions of the php package pschocke/laravel-telegram-login-widget. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pschocke/laravel-telegram-login-widget
More information about pschocke/laravel-telegram-login-widget
Files in pschocke/laravel-telegram-login-widget
Package laravel-telegram-login-widget
Short Description Easily integrate Telegrams login widget into your Laravel application to send Telegram messages
License MIT
Homepage https://github.com/pschocke/telegramloginwidget
Informations about the package laravel-telegram-login-widget
TelegramLoginWidget
Laravel Telegram Login Widget. Easily integrate Telegrams login widget to send Telegram messages.
You can view a full video of the installation process an usage here, where we build an app that sends Telegram notifications from start to finish.
Installation
Via Composer
Then publish the configuration file
Usage
First you have to create a bot at Telegram. After that set up your login widget in your frontend.
Create an env variable TELEGRAM_BOT_TOKEN
with your bots token
Create a route to handle the callback/redirect after the the successful connection between the user account and your telegram bot. Telegram uses a hash to allow you to verify the response is from Telegram. Here comes this package in play:
if you want more control over the response, you can use the validateWithError()
method to catch more fine tuned errors:
At this stage, $telegramUser
contains a collection of all attributes Telegram provides: id, first_name, last_name, username, photo_url and auth_date.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
- Patrick Schocke
- All Contributors
License
MIT. Please see the license file for more information.