Created
February 22, 2023 01:32
-
-
Save balazsorban44/0b97f96f90941706f8d7ea9bfa50c1d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/api/auth/[...nextauth]/route.ts | |
import NextAuth, { type NextAuthOptions } from "next-auth" | |
import GitHub from "next-auth/providers/github" | |
export const authOptions: NextAuthOptions = { | |
providers: [ | |
GitHub({ | |
clientId: process.env.GITHUB_ID, | |
clientSecret: process.env.GITHUB_SECRET, | |
}), | |
], | |
} | |
const handler = NextAuth(authOptions) | |
export { handler as GET, handler as POST } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment