public function actions() { return array_merge(parent::actions(), ['auth' => ['class' => AuthAction::class, 'successCallback' => function (ClientInterface $client) { $user = $this->user->findIdentityByAuthClient($client); if ($user) { $this->user->login($user); } }], 'lockscreen' => ['class' => RenderAction::class], 'back' => ['class' => RedirectAction::class, 'url' => Yii::$app->params['site_url']], 'terms' => ['class' => RedirectAction::class, 'url' => Yii::$app->params['terms_url']], 'signup-validate' => ['class' => ValidateAction::class, 'form' => SignupForm::class]]); }
public function actions() { return array_merge(parent::actions(), ['auth' => ['class' => AuthAction::class, 'successCallback' => [$this, 'onAuthSuccess']], 'index' => ['class' => RedirectAction::class, 'url' => ['/dashboard/dashboard']], 'profile' => ['class' => RedirectAction::class, 'url' => ['@client/view', 'id' => Yii::$app->user->identity->id]], 'lockscreen' => ['class' => RenderAction::class]]); }