aradiv / yii2-authclient-telegram
Telegram Auth for yii2-authclient
Requires
- php: ^7.0
- yiisoft/yii2-authclient: ~2.1
This package is auto-updated.
Last update: 2025-01-29 05:38:16 UTC
README
Yii2 Authclient Telegram
Since Telegram doent offer a direct real oAuth method this authclient utilizes Telepass.me until there is a native OAuth login with Telegram.
Installation:
composer require --prefer-dist aradiv/yii2-authclient-telegram
##Usage: in your config add:
'components' => [
'authClientCollection' => [
'class' => 'yii\authclient\Collection',
'clients' => [
'telegram' => [
'class' => 'aradiv\yii2\authclient\telegram\Client,
'clientId' => '<yourTelepassClientId'>
'clientSecret' => '<yourTelepassClientSecret'>
]
],
],
// ...
],
Why I don't use the Telegram Login Widget
The Telegram Login Widget works fine standalone. Integrating it as an additional login method while maintaining compatibility to other modules that utilize Yii2 Authclient isn't possible without doing all kinds special case handling and in some cases even change the entire user flow.
So to be able to
- Login with Telegram and
- keep using the modules I'm used to
I decided to relay on telepass.me for telegram login until there is an authclient compatible way for native telegram login.