# Discord Oauth2 Plugin

**URL:** https://meta.discourse.org/t/discord-oauth2-plugin/67174
**Category:** Plugin
**Tags:** deprecated, included-in-core
**Created:** [July 31, 2017, 3:37pm UTC](https://meta.discourse.org/t/discord-oauth2-plugin/67174 "2017-07-31T15:37:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [July 31, 2017, 3:37pm UTC](https://meta.discourse.org/t/discord-oauth2-plugin/67174/1 "2017-07-31T15:37:58Z")

</div>

### 🎉 Discord support is now included in Discourse core, this plugin is no longer required

> [@Configure Discord Login for Discourse](https://meta.discourse.org/t/configuring-discord-login-for-discourse/127129):
>
> bookmark This guide explains how to set up and configure Discord as a login option for your Discourse forum, including how to restrict access to specific Discord guilds. person_raising_hand Required user level: Administrator Once configured, Discord will appear as a login option alongside other authentication methods on your forum: Setting up Discord OAuth2 Creating a Discord application Visit the [Discord developer portal](https://discord.com/developers/applications) Click “New Application” Enter a name…

> **Original Plugin Description**
>
> By popular demand, I’ve created a plugin to allow users to log in via [Discord](https://discordapp.com/).
> 
> You can find the plugin here: [https://github.com/discourse/discourse-plugin-discord-auth](https://github.com/discourse/discourse-plugin-discord-auth)
> 
> ![](https://global.discourse-cdn.com/meta/original/3X/d/f/df19096f23aecc44a16c762ba67af4b2a20e6f82.png)
> 
> After installing the plugin,
> 
> - [Generate the application here](https://discordapp.com/developers/applications/me), and copy the Client ID and Client Secret.
> - Add the your website to the `REDIRECT URI(S)` using  
> `https://example.com/auth/discord/callback`  
> (replacing the https with http and [example.com](http://example.com) with your full qualified domain/subdomain)
> - Update the plugin settings in the Admin \> Settings area with the Client ID and Client Secret.
> 
> Special thanks to @cpradio for providing a great starting point for this via the [LinkedIn Oauth2 plugin](https://meta.discourse.org/t/linkedin-oauth2-plugin/46818).
> 
> * * *
> 
> ### Allowing logins only from a certain guild
> 
> The site setting `discord trusted guilds` allows you to restrict login to members of specific Discord guilds. To use, simply type the guild ID into the Discourse site setting.
> 
> To find your guild ID, log into your desired discord guild, and view a channel. The URL format is `https://discordapp.com/channels/{guild}/{channel}`. For example, given a URL as `https://discordapp.com/channels/123/456`, your guild ID would be `123`.
> 
> Users who are not part of an allowed guild will be shown this message upon login:
> 
> ![39](https://global.discourse-cdn.com/meta/original/3X/f/8/f85749b81c07fd4851cf10d483766d2155a1ae42.png)
> 
> If you are relying on this guild restriction for security, make sure to disable all other Discourse login methods.
> 
> To support this functionality, the plugin pulls in the “view guilds” scope permission in addition to email and identity.
