Yii2 authClientCollection显示错误实例化“yii \ authclient \ AuthAction”时缺少必需参数“id”

时间:2017-11-11 11:40:17

标签: yii2 yii2-advanced-app yii2-authclient

要在我的网站config / main.php中添加facebook登录,请添加以下代码和

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

在网站控制器行为中添加配置,如下所示,但显示错误

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

0 个答案:

没有答案