From 4d021a4634a6bc84ee25f0d43cbc6450d94265f0 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Mon, 31 Jul 2023 14:08:34 +0700 Subject: google sing up --- src/pages/api/auth/[...nextauth].js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/pages/api/auth/[...nextauth].js (limited to 'src/pages/api') diff --git a/src/pages/api/auth/[...nextauth].js b/src/pages/api/auth/[...nextauth].js new file mode 100644 index 00000000..f1d6a31f --- /dev/null +++ b/src/pages/api/auth/[...nextauth].js @@ -0,0 +1,15 @@ +import NextAuth from "next-auth/next"; +import GoogleProvider from "next-auth/providers/google" + +export default NextAuth({ + providers:[ + GoogleProvider({ + clientId: process.env.GOOGLE_CLIENT_ID, + clientSecret: process.env.GOOGLE_CLIENT_SECRET, + }), + ], + secret:process.env.JWT_SECRET + // pages:{ + // signIn: '/login', + // } +}) \ No newline at end of file -- cgit v1.2.3