Social Network Authentication
If you wish to add user registration and login throughout social networks the first thing you need to do is to add the official Yii's auth client extension to your application. The preferred way to install is through composer.
composer require --prefer-dist yiisoft/yii2-authclient
require section of your composer.json.
After you need to configure the
authClientCollection::clients on your Application
// ... 'components' => [ // ... 'authClientCollection' => [ 'class' => 'yii\authclient\Collection', 'clients' => [ 'facebook' => [ 'class' => 'Da\User\AuthClient\Facebook', 'clientId' => 'facebook_client_id', 'clientScret' => 'facebook_client_secret' ] ] ] ]
We have override the clients that come with Yii official's auth extension so to provide them with a signature that would help us access the email and username with ease.
The following is the list of clients supported by the module:
- Facebook -
- Github -
- Google -
- LinkedIn -
- Twitter -
- VKontakte -
- Yandex -
For further information about how to configure the clients, please visit the Official Yii Auth Client Extension documentation.
© 2amigos 2013-2017