How to add additional query parameters to google OAuth (i.e.prompt=select_account) #957
-
Hi! At the moment, there is no way to add additional query parameters to the Google OAuth api call. I want to be able to force the user to show the Choose your account/Account chooser screen every time they are trying to login. I.e. we need to add the "prompt=select_account%20consent" query parameter to the URL. At the moment, we can not allow users with multiple google account to switch between them. How can i achieve this? thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi! diff --git a/node_modules/@lucia-auth/oauth/dist/providers/google.js b/node_modules/@lucia-auth/oauth/dist/providers/google.js
index 246fd4f..be781ce 100644
--- a/node_modules/@lucia-auth/oauth/dist/providers/google.js
+++ b/node_modules/@lucia-auth/oauth/dist/providers/google.js
@@ -37,7 +37,8 @@ export const google = (auth, config) => {
...scopeConfig
],
searchParams: {
- access_type: config.accessType ?? "online"
+ access_type: config.accessType ?? "online",
+ prompt: 'select_account consent'
}
});
}, I am not sure what is the bet approach to take to address this issue? It would be nice if the thanks |
Beta Was this translation helpful? Give feedback.
It might be better to modify the returned
url
instead