WordPress OAuth & OpenID Connect Single Sign-On (SSO) plugin enables secure login into WordPress using Discord as OAuth and OpenID Connect provider. You can also configure plugin using different custom providers and standard IDPs. It supports advanced Single Sign-On (SSO) features such as user profile Attribute mapping, Role mapping, etc. Here we will go through a guide to configure SSO between WordPress and Discord. By the end of this guide, users should be able to login to WordPress from Discord. To know more about other features we provide in WP OAuth Single Sign-On ( OAuth & OpenID Connect Client ) plugin, you can click here.
To sync or connect the WordPress and Discord server, click on WordPress Discord Integrator
Download And Installation
- Log into your WordPress instance as an admin.
- Go to the WordPress Dashboard -> Plugins and click on Add New.
- Search for a WordPress OAuth Single Sign-On (SSO) plugin and click on Install Now.
- Once installed click on Activate.
Steps to configure Discord Single Sign-On (SSO) Login into WordPress
Step 1: Setup Discord as OAuth Provider
- Log in to Discord Console & click on New Application
- After clicking on the New Application button it will show you the popup for providing a name to the application. Click on the Create button after providing the application name.
- Navigate to the General Information section. Copy Client ID & Client Secret.
- Navigate to the OAuth2 section & Add Redirect button for adding the callback URL from the plugin and click on the Save button.
Step 1.1: Discord Role Mapping [Optional]
- After creating an OAuth Application,go to the Bot section.
- Click on the Add Bot button.
- Now we need to add Bot to our server with the permission to access roles. You need to check Bot and select the permission and it will generate the URL. You need to copy that URL and paste it into the new tab. After that, you need to select the server where you need to add the Bot.
- After successfully authorization, Go to the Bot section and copy the token.
- Now copy and paste the token into the configuration and also enter the guild or server ID (where you have added the Bot).
Step 1.2: Find your Guild ID (Server ID)
You will need the full Server ID (not the name) to continue. Follow these steps to find your Server ID:
- In Discord, open your User Settings by clicking the Settings Cog next to your user name on the bottom.
- Go to Appearance and enable Developer Mode under the Advanced section, then close User Settings.
- Open your Discord server, right-click on the server name, then select Copy ID.
- Paste the Server ID on your text editor for later.
- If desired, you can disable Developer Mode now.
Discord Endpoints and Scope:
|| identify email
|Access Token Endpoint:
|Get User Info Endpoint:||https://discordapp.com/api/users/@me
You have successfully configured Discord as OAuth Provider for achieving Discord login into your WordPress Site.
Step 2: Setup WordPress as OAuth Client
- After Plugin is activated, go to the plugin and search for Discord. Select Discord from the OAuth Providers list.
- Go to Configure OAuth tab and configure App Name, Client ID, Client Secret from provided Endpoints.
- Enter Scope value as identify email.
- Click on Save Settings to save the configuration.
You have successfully configured WordPress as OAuth Client for achieving Discord login into your WordPress Site.
Step 3: User Attribute Mapping
- User Attribute Mapping is mandatory for enabling users to successfully login into WordPress. We will be setting up user profile attributes for WordPress using below settings.
Finding user attributes
- Go to Configure OAuth tab. Scroll down and click on Test Configuration.
- You will see all the values returned by your OAuth Provider to WordPress in a table. If you don't see value for Email or Username, etc. make the required settings in your OAuth Provider to return this information.
- Once you see all the values in Test Configuration, go to Attribute / Role Mapping tab, you will get the list of attributes in a Username dropdown.
Step 4: Login Settings / Sign In Settings
- The settings in SSO Settings tab define the user experience for Single Sign-On (SSO). To add a login widget on your WordPress page, you need to follow below steps.
Sign In Settings
- Go to Appearances > Widgets.
- Select miniOrange OAuth. Drag and drop to your favourite location and save.
- Open your Wordpress page and you can see the login button there. You can test the SSO now.
In this Guide, you have successfully configured Discord Single Sign-On (SSO) by configuring Discord as OAuth Provider and WordPress as OAuth Client using our WP OAuth Single Sign-On ( OAuth / OpenID Connect Client ) plugin.This solution ensures that you are ready to roll out secure access to your WordPress site using Discord login credentials within minutes.
Mail us on email@example.com for quick guidance(via email/meeting) on your requirement and our team will help you to select the best suitable solution/plan as per your requirement.