It supports OpenId, OAuth1 and OAuth2 client types.
Usage:
php
class SiteController extends Controller
{
public function actions()
{
return [
'auth' => [
'class' => 'yii\authclient\AuthAction',
'successCallback' => [$this, 'successCallback'],
],
]
}
public function successCallback($client)
{
$attributes = $client->getUserAttributes();
user login or signup comes here
}
}
Usually authentication via external services is performed inside the popup window.
This action handles the redirection and closing of popup window correctly.