GitHub Provider
Resources
- GitHub - Creating an OAuth App
- GitHub - Authorizing OAuth Apps
- GitHub - Configure your GitHub OAuth Apps
- Learn more about OAuth
- Source code
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],
})