PHPackages                             teampanfu/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. teampanfu/oauth2-discord

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

teampanfu/oauth2-discord
========================

Discord OAuth 2.0 Client Provider for The PHP League OAuth2-Client

v1.0.3(2y ago)0139↓100%MITPHPPHP ^7.2|^8.0

Since Apr 16Pushed 2y agoCompare

[ Source](https://github.com/teampanfu/oauth2-discord)[ Packagist](https://packagist.org/packages/teampanfu/oauth2-discord)[ Docs](https://github.com/teampanfu/oauth2-discord)[ RSS](/packages/teampanfu-oauth2-discord/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Discord Provider for OAuth 2.0 Client
=====================================

[](#discord-provider-for-oauth-20-client)

[![Latest Version](https://camo.githubusercontent.com/b85491839c41357b5fc855b372c26e2262e1c704d1da3629ab2a75ac7c41100d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7465616d70616e66752f6f61757468322d646973636f72642e7376673f7374796c653d666c61742d737175617265)](https://github.com/teampanfu/oauth2-discord/releases)[![Total Downloads](https://camo.githubusercontent.com/59e594d382449314814f15e771663c38f4d98623485dad87df6135fedc4e6463/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7465616d70616e66752f6f61757468322d646973636f72642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/teampanfu/oauth2-discord)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

This package provides Discord OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

Installation
------------

[](#installation)

To install, use [Composer](https://getcomposer.org):

```
composer require teampanfu/oauth2-discord
```

Usage
-----

[](#usage)

The first step in implementing OAuth2 is [registering a developer application](https://discord.com/developers/applications) and retrieving your client ID and client secret.

### Authorization Code Flow

[](#authorization-code-flow)

```
