Created
October 25, 2023 11:48
-
-
Save Tribhuwan-Joshi/745cb4590b40ead7ce5051fa8a1a7644 to your computer and use it in GitHub Desktop.
Add Auth in Next13
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
import NextAuth from "next-auth"; | |
import GithubProvider from "next-auth/providers/github"; | |
export const authOptions = { | |
providers: [ | |
GithubProvider({ | |
clientId: process.env.GITHUB_ID ?? "", | |
clientSecret: process.env.GITHUB_SECRET ?? "", | |
}), | |
], | |
}; | |
export 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