Skip to content

Instantly share code, notes, and snippets.

@rahulmore01
Last active July 11, 2024 08:39
Show Gist options
  • Save rahulmore01/8ec03d552d61893c0282cacd42d40538 to your computer and use it in GitHub Desktop.
Save rahulmore01/8ec03d552d61893c0282cacd42d40538 to your computer and use it in GitHub Desktop.
next auth route file to setup next auth
import NextAuth from "next-auth/next";
import GoogleProvider from "next-auth/providers/google";
const handler = NextAuth({
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET,
}),
],
});
export { handler as GET, handler as POST };
@rahulmore01
Copy link
Author

next auth 1st step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment