yiiauth/gitlab
This extension adds GitLab OAuth2 supporting for yii2-authclient., (*1)
, (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require yiiauth/gitlab
or add, (*5)
"yiiauth/gitlab": "~0.1"
to the require
section of your composer.json., (*6)
Usage
You must read the yii2-authclient docs, (*7)
Register your application in GitLab, (*8)
and add the GitLab client to your auth clients., (*9)
php
'components' => [
'authClientCollection' => [
'class' => yii\authclient\Collection::class,
'clients' => [
'gitlab' => [
'class' => \yiiauth\gitlab\GitLabClient::class,
'domain' => 'https://gitlab.com',
'clientId' => 'gitlab_client_id',
'clientSecret' => 'gitlab_client_secret',
],
// other clients
],
],
// ...
]
, (*10)