Set up Discord as a login provider for your project.

Step 1: Create a Discord Application

To start, create a Discord bot. This is done through this link: https://discord.com/developers/applications

Give your discord-bot a appropriate name & and add a logo.

Follow Step 2 - for adding a correct url-redirict link for your application.

Step 2: Add an url-redirect for your application

The next step is to add a url link to the bot a user goes to after they have logged in. This is a necessary step for your Discord bot to work.

Click "Add redirect" under the category "OAuth2"

Here you need to insert the following link: https://<yoururl>.centox.io/api/auth/login/discord/callback

Be sure to click "Save Changes" at the bottom.

An example where the name of your forum is "demo"

If the link to your forum is demo.centox.io, insert the following link: https://demo.centox.io/api/auth/login/discord/callback

Follow Step 3 - on how to insert your Discord bot information into Centox.

Step 3: Insert the Discord bot credentials into your Centox project

The next step is to copy information from your Discord bot into your project on Centox.

Copy the "Client ID" & "Client Secret" into your project on Centox. Both of these pieces of information can be found under the "OAuth2" category of your discord bot.

To copy them into your Centox project, you need to access the admin page for your project. And go to Settings -> General -> Enable Provider

Once you have successfully copied them in, make sure to click "Enable Provider" Follow Step 4 - on how to check if your bot works when users try to log in.

Step 4: Check if you can log in via Discord on your forum

Last updated