Discord provider setup for Users & Permissions
The present page explains how to setup the Discord provider for the Users & Permissions feature.
Prerequisites
You have the Users & Permissions providers documentation.
Discord configuration
Note
Discord accepts the localhost
urls.
The use of ngrok
is not needed.
- Visit the Apps list page on the developer portal at https://discordapp.com/developers/applications/
- Click on New application button
- Fill the name and create
- Click on OAuth2 in the left menu
- And click on Add redirect button
- Fill the Redirect input with
http://localhost:1337/api/connect/discord/callback
URL and save - Click on General information in the left menu
- You should see your Application ID and secret, save them for later
Strapi configuration
- Visit the User & Permissions provider settings page at http://localhost:1337/admin/settings/users-permissions/providers
- Click on the Discord provider
- Fill the information (replace with your own client ID and secret):
- Enable:
ON
- Client ID: 665118465148846081
- Client Secret: iJbr7mkyqyut-J2hGvvSDch_5Dw5U77J
- The redirect URL to your front-end app:
http://localhost:3000/connect/discord/redirect
- Enable:
Your configuration is done.
Launch the backend and the react login example application, go to http://localhost:3000
and try to connect to the provider you configured.