pa3py6aka/yii2-discord-authclient

Discord OAuth2 for yii2-authclient

1.0 2021-04-25 09:16 UTC

This package is auto-updated.

Last update: 2024-12-25 17:48:39 UTC


README

This extension adds Discord OAuth2 supporting for yii2-authclient.

Latest Stable Version Total Downloads Monthly Downloads Latest Unstable Version License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require pa3py6aka/yii2-discord-authclient "^1.0"

or add

"pa3py6aka/yii2-discord-authclient": "^1.0"

to the require section of your composer.json.

Usage

You must read the yii2-authclient docs

Register your application on Discord developer site

and add the Discord client to your auth clients.

'components' => [
    'authClientCollection' => [
        'class' => 'yii\authclient\Collection',
        'clients' => [
            'discord' => [
                'class' => 'pa3py6aka\yii2auth\DiscordClient',
                'clientId' => 'discord_client_id',
                'clientSecret' => 'discord_client_secret',
            ],
            // other clients
        ],
    ],
    // ...
 ]