Skip to main content

Set up Discord as an identity provider

Last updated on February 12, 2024

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.

important

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.

  1. Log in to the AGS Admin Portal, select your Publisher Namespace, click Login Methods below the User Management sidebar, and click + Add New. Aclick add new login method

  2. Click Discord. click discord login method

  3. 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). configuring new login method

  4. You will be redirected to the details page. At this point, you just need to activate it and it will able to be used. activate discord login method

Give it a try

Make sure you've already set up the Discord Login Method in the Publisher Namespace.

  1. Go to your Player Portal and click Login. click login on your player portal

  2. Click the Discord Icon. If you can't find it, click More login options. click discord icon on your player portal

  3. 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. discord login page

note

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.