Discord OpenID Connect
Configure OpenID Connect with Discord
Once you have completed this configuration you may enable an OpenID Connect "Login with Discord" button for one or more FusionAuth Applications. See Discord - OAuth2 for an additional reference.
Register a Discord OAuth2 Application
You will first need to login to Discord.
Once logged in, navigate to https://discordapp.com/developers/applications/ and create a new application.
Once the application has been created, note the
CLIENT ID and the
CLIENT SECRET. These will be used respectively as the Client Id value and the Client secret value in your FusionAuth OpenID Connect Identity Providers configuration.
Now navigate toin the navigation pane on the left side of the screen to configure OAuth2 for your Discord app.
Configure a New FusionAuth OpenID Connect Identity Provider
To create a Discord Identity Provider return to FusionAuth and navigate to
Add provider and select
OpenID Connect from the dialog.
This will take you to the
Add OpenID Connect panel, and you’ll fill out the required fields. Client Id and Client secret values reference the previously noted Discord Application’s
CLIENT ID and
CLIENT SECRET. The Redirect URL is read only and generated for you based upon the URL of FusionAuth, this value should match the one you configured in your Discord application.
Discord has not implemented a well-known configuration endpoint, so you will need to disable the Discover endpoints field and specify the endpoints manually. The values for these fields are:
You will need to specify the scopes
identify email in the Scope field for your application.
You will need to set Client authentication method to
Request body (client_secret_post), as Discord expects the
client_secret in the request body of the authentication request.
In the following screenshot you will see that we have enabled this login provider for the
SeeFood application and enabled Create registration.
Discord does not implement OpenID Connect to spec. In order to pull in some additional data for populating the user profile (Discord username, Avatar URL, etc.) you can enable a Reconcile lambda. Reference this example lambda to specify your own lambda. This is optional.
That’s it, now the
Login with Discord button will show up on the login page of our