Discord
Turn on Sign in with Discord.
Users sign in with their Discord account. Auto Tournament asks Discord for the identify and email scopes. See Sign-in providers for how accounts and admin access work.
Create a Discord application
- Open the Discord Developer Portal and sign in.
- Click New Application.
- Enter a name, for example
Auto Tournament. Users see this name when they sign in. - Tick the box to agree to the Developer Terms of Service and Developer Policy, then click Create.
- In the left menu, click OAuth2.
- Under Client information, copy the Client ID.
- Click Reset Secret, confirm, and copy the Client Secret. Discord shows it only once.
Add the redirect URL
On the same OAuth2 page, under Redirects, click Add Redirect and enter:
FRONTEND_BASE_URL/api/auth/discord/callbackFor example https://tournament.example.com/api/auth/discord/callback. Click Save Changes.
Turn it on in Auto Tournament
In Settings → Sign-in → Discord, paste the Client ID and Client Secret, turn it on and save. The callback URL to register is shown there with a copy button. The Sign in with Discord button appears on the login page right away.
Prefer environment variables? Set AUTH_DISCORD_ENABLED=true, DISCORD_CLIENT_ID and DISCORD_CLIENT_SECRET and restart. They are imported once.
Test the button
- Open
FRONTEND_BASE_URL/loginin a private browser window. - Click Sign in with Discord and approve the request in Discord.
- You are signed in. Someone new gets an account of their own when registration is open (Settings → Players & Access). Steam can be linked later on /me/connections.
If Discord shows "Invalid OAuth2 redirect_uri", the redirect URL in step 2 does not match FRONTEND_BASE_URL exactly.