Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
Getting Started
Providers
Discord

Discord Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/discord

Environment Variables

AUTH_DISCORD_ID
AUTH_DISCORD_SECRET

Configuration

/auth.ts
import NextAuth from "next-auth"
import Discord from "next-auth/providers/discord"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [Discord],
})
Auth.js © Balázs Orbán and Team - 2024