Discord OAuth SSO Setup

Last updated on
25 February 2026

This guide will help you configure Discord as an OAuth provider making Drupal as an OAuth Client. Following these steps will allow you to configure OAuth/OpenID SSO between Discord and your Drupal site such that your users will be able to login to your Drupal site using their Discord credentials. 

We provide Drupal OAuth & OpenID Connect Login - OAuth2 Client SSO Login module which is compatible with Drupal 7, Drupal 8, Drupal 9, Drupal 10, and Drupal 11.

Download  Know more

Prerequisite:

Setup Video:

 Drupal Discord Youtube Video

Steps to configure Drupal as OAuth Client:

  • After installing the module on your Drupal site, navigate to the Configuration tab and click on the miniOrange OAuth Client.

    Click on miniOrange OAuth Client Configuration from the Configuration tab

  • In the Manage section, under the Client Configuration tab, click on the + Add New button to configure the desired OAuth Client.

    Drupal OAuth Client Add new Provider

  • Provide the following information in the Client Configuration -> Add tab:
    • Select Discord from the Select Application dropdown.
    • Enter the application name in the Custom App Name text field. For example, Discord.
    • Copy the Callback/Redirect URL and keep it handy.Drupal OAuth Client - Select the Application and copy the Callback/Redirect URL

Configure OAuth SSO Application in Discord:

  • Login into Discord Developer portal.
  • Select Application from the left navigation panel, and click on New Application button.

    Drupal OAuth/OpenID Connect Login module - Click on New Application

  • When you click the New Application button, a pop-up appears in which you can input the name of the application in the Name text field.
  • Then, select the checkbox and click on the Create button.

    Drupal IOAuth/OpenId Connect Login module - Enter Application

  • Under OAuth2 -> General, click on the Add Redirect button and paste the copied Callback/Redirect URL (from your Drupal site) into the Redirects text field.

    drupal oauth client add redirect url

  • Once done, click on the Save Changes button.

Integrating Drupal with Discord:

  • Navigate to the Discord portal and copy the CLIENT ID from the Client information section.

    Discord Developer Application - Copy the Client ID

  • Go to the Drupal site and paste the copied CLIENT ID into the Client ID text field.

    Drupal OAuth OIDC Client Configuration - Paste the copied Client ID

  • Again back to the Discord portal.
  • Click on the Reset Secret button in the CLIENT SECRET.

    Discord Application, click on Reset Secret button

  • On the REGENERATE SECRET KEY? popup, click on the Yes, do it! button.

    Discord Developer Application - Open a popup message window

  • Copy CLIENT SECRET from the Client information section by clicking on the Copy button.

    Disord Application - Copy the Client Secret

  • Navigate to the Drupal site and paste the copied CLIENT SECRET into the Client Secret text field.

    Drupal OAuth OIDC Client Configuration - Paste the Copied Client Secret

  • After you've checked the Scope and Endpoints, click on the Save Configuration button.

  • The Send Client ID and Secret in radio button allow you to specify whether the Client ID and Secret should be included in the header or the body of the Token Endpoint Request. If you're unsure which option to select, you can stick with the default settings.

    Drupal OAuth Client - Check Scope and Endpoints then click on Save Configuration button

You can also refer to the Discord Endpoints and Scope from the table given below:

Scope identify email
Authorize Endpoint https://discord.com/api/oauth2/authorize
Access Token Endpoint https://discord.com/api/oauth2/token
Get User Info Endpoint https://discord.com/api/users/@me

Test configuration of Drupal with Discord:

  • After successfully saving your application, click the Perform Test Configuration button to check the connection between Drupal and Discord.

    Drupal OAuth Client Configuration - Click on Perform Test Configuration

  • On a Test Configuration popup, if you don't have an active session in Discord on the same browser, you will be asked to sign in to your Discord account. After successfully logging into the AWS Cognito account, you will be provided with a list of attributes that are received from Discord.
  • Scroll to the bottom and click on the Configure Mappings button.

    Drupal OAuth Client Configuration - See Attribute list that are coming from Discord

  • Once you click on the Configure Mapping button, you will be redirected to the Attribute Mapping tab. From there, select the appropriate attribute from the OAuth Server Attribute dropdown where the email value is received, and then click the Save Configuration button.

    Drupal OAuth OIDC Client Configuration - Attribute and Role Mapping

Please note: Mapping the Email Attribute is mandatory for your login to work. 

Congratulations! You have successfully configured Discord as OAuth Provider and Drupal as OAuth Client.

How to perform the SSO login?

  • Now, open a new browser/private window and go to your Drupal site login page.
  • Click on the Login using Discord link to initiate the SSO from Drupal.

Contact our 24*7 support team

Feel free to reach out to our Drupal experts if you need any sort of assistance in setting up OAuth2 Client SSO Login on your Drupal site.

 Get In Touch With Us Join Our Slack Channel

back to top Back to top  

Help improve this page

Page status: No known problems

You can: