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

GitHub Provider

Resources

Setup

Callback URL

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

Environment Variables

AUTH_GITHUB_ID
AUTH_GITHUB_SECRET

Configuration

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