authclient\AuthAction $successCallback

$successCallback public property

PHP callback, which should be triggered in case of successful authentication. This callback should accept yii\authclient\ClientInterface instance as an argument. For example:

public function onAuthSuccess($client)
{
    $attributes = $client->getUserAttributes();
    // user login or signup comes here
}

If this callback returns yii\web\Response instance, it will be used as action response, otherwise redirection to $successUrl will be performed.

doc_Yii
2016-10-30 16:48:43
Comments
Leave a Comment

Please login to continue.