Set up Discord as an identity provider
Overview
This guide helps verified Discord developers connect Discord accounts to AccelByte Gaming Services (AGS). You may need to set up additional features within Discord services that we haven't listed here. For more information about setting up Discord services, we recommend contacting your Discord representative and reviewing Discord documentation.
This guide is intended for public use and contains limited information due to confidentiality. We recommend you refer to the full confidential guide first. To request a copy of the confidential guide, contact your AccelByte Technical Producer.
Goals
Enable the Discord authentication method for your publisher website with the AGS Player Portal.
Prerequisites
- A Discord developer account. Visit Discord Developer Portal for details.
- An AGS Admin Portal account to set up authentication and manage permissions.
- A publisher namespace for your Player Portal and Launcher.
- A Player Portal.
Set up the Discord application
Create a Discord application
Create a Discord application. To do this, you can follow the Creating an app guide.
Set up Discord OAuth2
Set up your Discord OAuth2. Generate an OAuth2 Client Secret and save it. Also, add these URIs to your OAuth2 Redirect URLs for the authentication process:
https://<BaseURL>
https://<BaseURL>/iam/v3/platforms/discord/authenticate
https://<BaseURL>/iam/v3/public/namespaces/<namespace>/users/me/platforms/discord/web/link/establish
The BaseURL is your domain address, e.g., https://development.accelbyte.io
.
Read the Discord OAuth2 documentation for more details.
Set up a web login for Discord
Configuration steps
Use the following steps to set up Discord logins in the player portal. This will allow your players to sign in to your player portal using their Discord accounts.
In the AGS Admin portal, go to your publisher namespace.
On the sidebar menu, go to Game Setup > 3rd Party Configuration > Auth & Account Linking.
On the Login Methods page, click on the + Add New button.
From the list of login method options, select Discord.
Fill the Client ID field with the Discord App Client ID, the Client Secret field with the Discord App Client Secret, and the Redirect URI field with the
<BaseURL>
(BaseURL is your domain address, e.g.,https://development.accelbyte.io
).You will be redirected to the details page. At this point, you just need to activate it and it will able to be used.
Give it a try
Make sure you've already set up the Discord login method in the publisher namespace.
Go to your Player Portal and click Login.
Click the Discord icon. If you can't find it, click More login options.
The system redirects you to the Discord login page. Fill in your Discord credentials to proceed.
That's it! You've completed the required steps.
The system asks players to link their Discord account with an existing or new AccelByte account. AccelByte is working to make this configurable, so that players can log in to the Player Portal with a headless account.