Hi,
need help
the after install AuthClient for yii2
do not access users/registration
config file add
======
‘clients’ => [
‘facebook’ => [
'class' => 'yii\authclient\clients\Facebook',
'clientId' => 'secret',
'clientSecret' => 'secret',
],
],
========
Controller add
========
public function actions()
{
return [
'auth' => [
'class' => 'yii\authclient\AuthAction',
'successCallback' => [$this, 'successCallback'],
],
];
}
public function actionRegistration()
{
$model = new Shopuser();
return $this->render('registration');
}
public function successCallback($client)
{
$attributes = $client->getUserAttributes();
// user login or signup comes here
}
==========
view file add
=========
<?= yii\authclient\widgets\AuthChoice::widget([
'baseAuthUrl' => ['users/registrations']
]) ?>
=========
Tell me what I not so made
Тhanks!