In order to use Google OAuth you must create a project at and setup its credentials at . In order to enable using scopes for retrieving user attributes, you should also enable Google+ API at Example application configuration: php 'components' => [ 'authClientCollection' => [ 'class' => 'yii\authclient\Collection', 'clients' => [ 'google' => [ 'class' => 'yii\authclient\clients\Google', 'clientId' => 'google_client_id', 'clientSecret' => 'google_client_secret', ], ], ] ... ]
См. также: https://console.developers.google.com/project
С версии: 2.0
Автор: Paul Klimov (klimov.paul@gmail.com)
Наследование: extends yii\authclient\OAuth2
Пример #1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if ($this->scope === null) {
         $this->scope = implode(' ', ['profile', 'email']);
     }
 }