public function connectCallback($client)
{
// uncomment this to see which attributes you get back
//echo "<pre>";print_r($client->getUserAttributes());echo "</pre>";exit;
// check if user is not logged in. if so, do nothing
if (Yii::$app->user->isGuest) {
return;
}
// register a new user
$userAuth = $this->initUserAuth($client);
$userAuth->setUser(Yii::$app->user->id)->save();
}