Provider – Discord

Microsoft Sample

Table of contents

How to enable Discord login in WordPress

1. Create a Discord App

To be able to log in via Discord you must create a Discord App first.

  1. Navigate to https://discord.com/developers/applications
  2. If you are not logged in yet, then log in with your Discord credentials and visit the link above again.
  3. Click the “New Application” button.
  4. Fill the “Name” field and click the “Create” button.
  5. Optional: Select an “App Icon” and add a “Terms of Service URL” and “Privacy Policy URL”.
  6. On the left side, click on the “OAuth2” menu point in the Settings.
  7. Add the URL to the “Redirects” field.
  8. Click the “Save Changes” button.
  9. Copy the necessary “Client ID” and “Client Secret” values and fill these fields in the plugin settings!

2. App setup

Once your Discord app is ready you’ll need to copy and paste the Client ID and Client Secret to the Discord provider’s Settings tab. You can find the information at your Discord app’s OAuth2 panel.

3. Verifying

Once your Client ID and Client Secret has been added you need to verify the setup first. This verification helps you identify possible problems with the app.

Settings

Microsoft Provider Configuration

Client ID

The Client ID of your Discord app. You can find it at your App’s OAuth2 panel.

Client Secret

The Client Secret of your Discord app. You can find it at your App’s OAuth2 panel.

Force reauthorization on each login

When enabled, the users will be asked to reauthorize the Discord App each time they login with Discord.

Microsoft other settings

Username prefix on Register

Whenever a new user registers with their Discord account they can get a custom prefix so you can easily identify them.

Fallback username prefix on register

Whenever a new user registers with their Discord account and we can not generate a valid username from the first name or last name, a random username will be generated. With this option they can get a custom prefix so you can easily identify them.

Terms and conditions

This option can only be seen, if Terms and conditions is set to Show in Global Settings → Privacy tab. Here you can set custom Terms and Conditions for users who register with Discord. For more information please read our GDPR documentation.

Common error messages returned by Discord during verification

client_id is incorrect

Unknown Application

The Application (client) ID you copied from the Discord app is invalid. Make sure the correct one was copied.

client_secret is incorrect

Error: invalid_client:

The Client secret you copied from the Discord app is invalid. Make sure the correct one was copied.