Hi,
need help
the after install AuthClient for yii2
do not access users/registration
Invalid Configuration – yii\base\InvalidConfigException
'clients' => [
'facebook' => [
'class' => 'yii\authclient\clients\Facebook',
'clientId' => 'secret',
'clientSecret' => 'secret',
],
],
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
}
<?= yii\authclient\widgets\AuthChoice::widget([
'baseAuthUrl' => ['users/registrations']
]) ?>
Tell me what I not so made
Тhanks!
"yiisoft/yii2-authclient": "2.0.*@dev"
Unable to reproduce.
@nik4152, please use Official Yii forum to ask a questions - GitHub is a bug tracking system.
already working need to be removed config file
'authClientCollection' => [
'class' => 'yii\authclient\Collection',
'clients' => [
'facebook' => [
'class' => 'yii\authclient\clients\Facebook',
'clientId' => 'xxxxxx',
'clientSecret' => 'xxxxxx',
],
],
],
and through time back and it worked
glitch )
I do not know why but it works thanks
but i need solution. I dont see that it works
@Skit what are you talking about? Можно по-русски
Не смог разобраться почему получаю исключение: Missing required parameter "id" when instantiating "yii\authclient\AuthAction". Всё как у ТС
Спасибо, за ответ.
Не смог воспроизвести. Есть есть способ воспроизвести на чистой установке - пожалуйста, поделитесь.
Спасибо за совет! Поставил на чистую, хотя была тоже, фактически чистая.
Оказалось, что я просто do insert in this section
public function behaviors()
{
return [
и get error! А нужно insert in action method
public function actions()
{
return [
So good works!
Спасибо!
Most helpful comment
Спасибо за совет! Поставил на чистую, хотя была тоже, фактически чистая.
Оказалось, что я просто do insert in this section
и get error! А нужно insert in action method
So good works!
Спасибо!