Created
April 21, 2024 22:58
-
-
Save darnocer/e9ccccd79158564c90deca997db1ae95 to your computer and use it in GitHub Desktop.
NextAuth for Google Provider
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, { NextAuthOptions } from "next-auth"; | |
import GoogleProvider from "next-auth/providers/google"; | |
export const authOptions: NextAuthOptions = { | |
providers: [ | |
GoogleProvider({ | |
clientId: process.env.GOOGLE_CLIENT_ID, | |
clientSecret: process.env.GOOGLE_CLIENT_SECRET, | |
}), | |
], | |
secret: process.env.SECRET, | |
session: { | |
strategy: "jwt", | |
}, | |
}; | |
export default NextAuth(authOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment