yiiauth/gitlab

GitLab OAuth2 for yii2-authclient

2.0.0 2021-01-22 18:17 UTC

This package is auto-updated.

Last update: 2024-05-16 14:06:12 UTC


README

This extension adds GitLab OAuth2 supporting for yii2-authclient.

Latest Stable Version Total Downloads Monthly Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require yiiauth/gitlab

or add

"yiiauth/gitlab": "~0.1"

to the require section of your composer.json.

Usage

You must read the yii2-authclient docs

Register your application in GitLab

and add the GitLab client to your auth clients.

'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
        ],
    ],
    // ...
 ]