Authentication client
This extension adds OpenID, OAuth, and OAuth2 consumers for the Yii 2.0 framework.
Getting ready
Create a new application by using composer, as described in the official guide at http://www.yiiframework.com/doc-2.0/guide-start-installation.html.
Install the extension with the following command:
composer require yiisoft/yii2-authclient
How to do it…
Open your GitHub applications page https://github.com/settings/applications and add your own new application:
Get the Client ID and Client Secret:
Configure your web configuration and set the corresponding options for your
authClientCollection
component:'components' => [ // ... 'authClientCollection' => [ 'class' => 'yii\authclient\Collection', 'clients' => [ 'google' => [ 'class' =>'yii\authclient\clients\GoogleOpenId' ], 'github' => [ 'class' => 'yii\authclient\clients\GitHub', 'clientId' =>...