Yii Framework Forum: need help AuthClient error "id" - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

need help AuthClient error "id" need help AuthClient error id Rate Topic: -----

#1 User is offline   nik4152 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 04-January 15

Posted 04 January 2015 - 07:19 PM

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!

Attached File(s)


0

#2 User is offline   nik4152 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 04-January 15

Posted 05 January 2015 - 02:56 PM

solution
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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users