メインコンテンツまでスキップ

Discord をアイデンティティプロバイダーとして設定する

Last updated on October 23, 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. In the AGS Admin portal, go to your publisher namespace.

  2. On the sidebar menu, go to Game Setup > 3rd Party Configuration > Auth & Account Linking.

  3. On the Login Methods page, click on the + Add New button.

    Click add new login method

  4. From the list of login method options, select Discord.

    click discord login method

  5. 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

  6. 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

注記

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.