Discord SSO Login

Last updated on
19 March 2024

This document will assist you to configure Discord as an OAuth/OpenID provider, making Drupal 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 log in to your Drupal site using their Discord credentials.

We provide the Drupal OAuth Login - OAuth OIDC SSO module which is compatible with Drupal 7, Drupal 8, Drupal 9, and Drupal 10.

Download  Know more

Prerequisite:

Setup Video: 

 Drupal Google Authenticator Youtube Video

Step 1: Setting up Discord as OAuth Provider in Drupal:

  • Navigate to the Configure Application tab and search for Discord using the search box.

    Drupal OAuth Login Discord select app

  • Now, click on the Copy button to copy the Callback/Redirect URL and keep it handy. After that, click on the Step 2/3 button.

    Drupal OAuth Login Discord copy callback url

Configure OAuth Single Sign-On Application in Discord:

  • Go to the Discord admin dashboard and sign up/log in to your account.
  • Click on the  New Application button it will show you the popup for the application name. Click on the Create button after providing the application name.

    Drupal oauth login discord new application

  • Navigate to the OAuth2 tab and click on the Add Redirect button for adding the callback URL which you have copied in step 1.

    Drupal Oauth Login Dkiscord paste callback url

Step 2: Client ID and Client Secret setup in Drupal:

  • Copy the Client ID from the Discord application and paste it into Drupal OAuth Login's Client ID text field.

    Drupal oauth c\login discord copy client id

    Drupal oauth login discord paste client id

  • Copy the Client Secret from the Discord application and paste it into Drupal OAuth Login's Client Secret text field.

    Drupal oauth login copy client secret

    Drupal OAuth Login Discord paste client secret

  • Once done, click on the Step 3/3 button.

Step 3: Scope and Endpoints setup in Drupal:

  • Check the Endpoints and Scope. Click on the All Done! button.

    Drupal OAuth login endpoints

Discord Endpoints and scope:

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

Verify SSO Connection and Mapping:

  • Once done, you can click on the Perform Test Configuration button to check the connection between Drupal and Discord.
  • After a successful connection, select the Email Attribute from the dropdown and click on the Done button.

    Drupal oauth login discord test configuration

  • Congratulations! You have successfully configured Discord as OAuth Provider and Drupal as OAuth 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.

Support:

Need assistance? Contact our 24*7 support team

If you require any help with installing or configuring this module, please feel free to reach out to us at our 24*7 Support by clicking on the Support Icon from the bottom right corner and send us a query. You can also join us on Drupal Slack in the #miniorange channel.

 Get In Touch With Us Join Our Slack Channel

back to top Back to top