Discord
Resources
Section titled “Resources”Environment variables
Section titled “Environment variables”DISCORD_CLIENT_ID=DISCORD_CLIENT_SECRET=
Callback URL
Section titled “Callback URL”Add the redirect URI in your Discord application under “OAuth2” → “General” → “Redirects”.
/api/auth/discord/callback
Config
Section titled “Config”The identify
and email
scopes are requested by default.
import process from 'node:process'import { createAuth } from '@rttnd/gau/core'import { Discord } from '@rttnd/gau/oauth'
export const auth = createAuth({ providers: [ Discord({ clientId: process.env.DISCORD_CLIENT_ID, clientSecret: process.env.DISCORD_CLIENT_SECRET, }), ],})
Provider params
Section titled “Provider params”params
Section titled “params”Type:
Record<string, string>
Default: —
Extra query params appended to the authorization URL.