Search Results :

×

Discord SSO Login with Drupal OAuth Client | Drupal SSO Login


Drupal Discord SSO integration will allow you to configure Single Sign-On ( SSO ) login between your Drupal site and Discord using OAuth/OpenID protocol. Drupal OAuth 2.0/OpenID connect module gives the ability to enable login using OAuth 2.0/OIDC Single Sign-On to Drupal Site. We provide the Drupal OAuth/OpenID Connect Login module for Drupal 7, Drupal 8, Drupal 9 and Drupal 10.

Here we will go through a guide to configure the SSO login between Drupal and Discord. By following these steps, users of Discord will be able to log into the Drupal site using their Discord credentials.

If you have any queries or if you need any sort of assistance in configuring the module, you can contact us at drupalsupport@xecurify.com. If you want, we can also schedule an online meeting to help you configure the Drupal OAuth & OpenID Connect Login – OAuth2 Client SSO Login module.


Pre-requisite: Download and Installation 


  • Download the module:
    Composer require 'drupal/miniorange_oauth_client'
  • Navigate to Extend menu on your Drupal admin console and search for miniOrange OAuth Client Configuration using the search box.
  • Enable the module by checking the checkbox and click on the Install button.
  • You can configure the module at:
    {BaseURL}/admin/config/people/miniorange_oauth_client/config_clc
  • Install the module:
    drush en drupal/miniorange_oauth_client
  • Clear the cache:
     drush cr
  • You can configure the module at:
    {BaseURL}/admin/config/people/miniorange_oauth_client/config_clc
  • Navigate to Extend menu on your Drupal admin console and click on Install new module.
  • Install the Drupal OAuth & OpenID Connect Login - OAuth2 Client SSO Login module either by downloading the zip or from the URL of the package (tar/zip).
  • Click on Enable newly added modules.
  • Enable this module by checking the checkbox and click on install button.
  • You can configure the module at:
    {BaseURL}/admin/config/people/miniorange_oauth_client/config_clc

Video Setup Discord Single Sign-on Integration with Drupal OAuth/OpenID Client

You can refer the steps to configure Discord SSO integration with the Drupal OAuth/OIDC Client module from the Video or Documentation given below:

How to integrate Discord Single Sign-on with Drupal OAuth/OpenID Client

1. Configure Drupal as OAuth Client

  • After installing the module, go to the Configuration tab and click on the miniOrange OAuth Client Configuration module link.
  • Drupal OAuth Client - Configuration tab and select miniorange oauth client module
  • In the Configure OAuth tab, select Discord from the Select Application dropdown list.
  • Note: In case you can't find your Application/Provider in the Select Application dropdown list, choose the Custom OAuth 2.0 Provider instead.

  • Copy the Callback/Redirect URL and keep it handy.
  • Please Note: If your provider only supports HTTPS Callback/Redirect URL and you have an HTTP site, just save your base site URL in the Sign In Settings tab with HTTPS.

  • In the Display Name text field, enter the name of Application. For example, Discord
  • Drupal OAuth Client - Configure OAuth tab Select Discord and copy the Callback URL

2. Create SSO Application in Discord

  • Log in to the Discord Developer portal.
  • Select Application from the left navigation panel, then click the New Application button.
  • Discord SSO Login console Click On New Application
  • A popup will display, in which you can enter the name of the application in the Name text field.
  • Then, click the checkbox to agree to the Discord Developer terms and conditions before clicking the CREATE button.
  • Discord SSO Login console Enter name of the Application
  • Under OAuth2 -> General, click the Add Redirect button and enter the copied Callback/Redirect URL (from step 1) into the Redirects text field.
  • Once completed, click the Save Changes button.
  • Discord SSO Login Paste the copied Callback/Redirect URL

3. Integrating Drupal with Discord

  • Navigate to the Discord portal.
  • In the OAuth2 panel, copy the CLIENT ID from the Client information section.
  • Discord SSO - OAuth2 Copy Client ID
  • Go to the Drupal site and paste the previously copied CLIENT ID into the Client ID text field.
  • Drupal OAuth OpenID OIDC Single Sign On (SSO) Discord SSO OAuth2 Callback Redirect URL
  • Go, back to the Discord portal.
  • Click the Reset Secret button under CLIENT SECRET in the Client information section.
  • Discord SSO - Click on Reset Secret button
  • Open a REGENERATE SECRET KEY? popup and click the Yes, do it! button.
  • Discord SSO - Open a popup REGENERATE SECRET KEY?
  • By clicking the Copy button, you can copy CLIENT SECRET from the Client information area.
  • Discord SSO OAuth2 Copy client secret
  • Navigate to the Drupal site and paste the CLIENT SECRET into the Client Secret text field.
  • Once you've verified the Scope and Endpoint, click on the Save Configuration button to save the Discord information.
  • Drupal OAuth OpenID OIDC Single Sign On (SSO) Paste Client Secret
  • Once you've verified the Scope and Endpoint, click on the Save Configuration button to save the Discord information.
  • Drupal OAuth OpenID OIDC Single Sign On (SSO) Check Scope and Endpoint

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

    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

4. Test Configuration of Drupal with Discord

  • After successfully saving the configurations, click on the Perform Test Configuration button to test the connection between Drupal and Discord.
  • Discord sso login with drupal OAuth OpenID Single Single On - Click on Perform Test Configuration
  • This Test Configuration window will provide you with a list of the attributes that are coming from the Discord.
  • Select the Email Attribute from the dropdown menu in which the user's email ID is obtained and click on the Done button.
  • Discord sso login with drupal OAuth OpenID Single Single On Test Configuration popup
  • Now, in the Attribute & Role Mapping tab, you can also choose the Username Attribute from the dropdown and click on the Save Configuration button.
  • Drupal OAuth OpenID Single Single On Select Username Attribute From Attribute and Role Mapping tab

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

  • Now log out and go to your Drupal site’s login page. You will automatically find a Login with Discord link there. If you want to add the SSO link to other pages as well, please follow the steps given in the image below :
  • Drupal OAuth OpenID Single Single On - Add SSO link in other Drupal site

24*7 Active Support

If you face any issues or if you have any questions, please feel free to reach out to us at drupalsupport@xecurify.com. In case you want some additional features to be included in the module, please get in touch with us, and we can get that custom-made for you. Also, If you want, we can also schedule an online meeting to help you configure the Drupal OAuth/OpenID Single Sign On module.

Additional Resources

Our Other modules

Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com