This guide explains how to set up Discord as an authentication provider with Stack Auth. Discord OAuth2 allows users to sign in to your application using their Discord account.Documentation Index
Fetch the complete documentation index at: https://stackauth-e0affa27-chore-move-mcp-to-a-sep-app.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Integration Steps
Create a Discord Developer App
- Navigate to the Discord Developer Portal.
- Click the New Application button in the top-right corner.
- Enter a name for your application and click Create. You will be redirected to the General Information page.
- Select OAuth2 in the left sidebar.
- Under Redirects add
https://api.stack-auth.com/api/v1/auth/oauth/callback/discord - In the OAuth2 section, enable the required scopes: ‘identify’ and ‘email’
- Click Save Changes
- Save the Client ID and Client Secret. You may need to select Reset Secret to generate a new one.
User Profile Data
When a user signs in with Discord, Stack Auth will create a user profile with the following data:- User ID: Discord’s unique user ID
- Username: The user’s Discord username
- Avatar: The user’s Discord avatar (if available)
- Email: The user’s email if the ‘email’ scope is requested
Need More Help?
- Check the Discord OAuth2 Documentation
- Visit our Discord Support Channel