From fe22d47b5433142932b6d0822f4e3197d8f78d70 Mon Sep 17 00:00:00 2001 From: nickbar01234 Date: Sun, 14 Apr 2024 02:22:06 -0400 Subject: [PATCH] Add scope to identify user --- src/app/api/auth/[...nextauth]/route.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/api/auth/[...nextauth]/route.ts b/src/app/api/auth/[...nextauth]/route.ts index 7b160a03..7a4e27a6 100644 --- a/src/app/api/auth/[...nextauth]/route.ts +++ b/src/app/api/auth/[...nextauth]/route.ts @@ -5,7 +5,11 @@ import { prisma } from "@server/db/client"; import NextAuth, { NextAuthOptions } from "next-auth"; import GoogleProvider from "next-auth/providers/google"; -const GOOGLE_API_SCOPE = ["openid"]; +const GOOGLE_API_SCOPE = [ + "openid", + "https://www.googleapis.com/auth/userinfo.profile", + "https://www.googleapis.com/auth/userinfo.email", +]; export const authOptions: NextAuthOptions = { adapter: PrismaAdapter(prisma),