PHPackages                             impact/oauth2-discord - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. impact/oauth2-discord

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

impact/oauth2-discord
=====================

A Discord provider for the League Oauth2 client

010PHP

Since Oct 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Impact-Offroading-LTD/oauth2-discord)[ Packagist](https://packagist.org/packages/impact/oauth2-discord)[ RSS](/packages/impact-oauth2-discord/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

### Discord OAuth2 Provider

[](#discord-oauth2-provider)

This is a Discord provider for use with the PHP League's [OAuth2 client](https://github.com/thephpleague/oauth2-client).

### Installation

[](#installation)

To install the provider use Composer:

```
composer require impact/oauth2-discord

```

### Usage: OAuth Connection

[](#usage-oauth-connection)

The code below is an example of how to use the library to make an OAuth connection to the Discord service, authorizing it for your account. By default it will request these scopes:

- `identity`
- `email`
- `messages.read`
- `guilds`

See [this documentation](https://discordapp.com/developers/docs/topics/oauth2) for more about scopes.

```
