Yii2 authClientCollection showing error Missing required parameter "id" when instantiating "yii\authclient\AuthAction"

448 Views Asked by At

To add facebook login in my website in config/main.php i add below code and and

  'authClientCollection' => [
     'class' => 'yii\authclient\Collection',
     'clients' => [
      'facebook' => [
       'class' => 'yii\authclient\clients\Facebook',
       'clientId' => '1956343439487263',
       'clientSecret' => 'c72a44343439f1ec8bc7b671e935e3c8',
      ],
     ],
    ],

Add configuration in site controller behaviors like below but show that error

 'auth' => [
     'class' => 'yii\authclient\AuthAction',
     'successCallback' => [$this, 'successCallback'],
  ],
0

There are 0 best solutions below