aradiv/yii2-authclient-telegram

Telegram Auth for yii2-authclient

v0.0.1 2018-10-28 12:01 UTC

This package is auto-updated.

Last update: 2024-04-29 03:38:45 UTC


README

Yii2 Latest Stable Version Packagist

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

  1. Login with Telegram and
  2. 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.