From 6e79858f41c21eebac2c1c52209bcd38f6317c6f Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Wed, 20 Sep 2023 11:22:43 +0800 Subject: [PATCH] fix: add prompt select_account for google login (#4415) --- apps/server/src/modules/auth/next-auth-options.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/server/src/modules/auth/next-auth-options.ts b/apps/server/src/modules/auth/next-auth-options.ts index fc122c3dad..48ab728bda 100644 --- a/apps/server/src/modules/auth/next-auth-options.ts +++ b/apps/server/src/modules/auth/next-auth-options.ts @@ -158,6 +158,9 @@ export const NextAuthOptionsProvider: FactoryProvider = { clientSecret: config.auth.oauthProviders.google.clientSecret, checks: 'nonce', allowDangerousEmailAccountLinking: true, + authorization: { + params: { scope: 'openid email profile', prompt: 'select_account' }, + }, }) ); }