mirror of
https://github.com/better-auth/better-auth.git
synced 2026-08-01 10:50:40 -05:00
fix(oauth): Google prompt doesn't allow + (#3303)
* fix(oauth): Google prompt doesn't allow `+` In order to get `consent` and `select_account`, we need to pass it like "select_account consent". However BA's type definitions only allow for "select_account+consent" - likely because it's the standard? Anyway this PR will take that `select_account+consent` defined by the user and convert it to the spaced version (`select_account consent`) * chore: lint * chore: cleanup
This commit is contained in:
@@ -74,6 +74,9 @@ export const google = (options: GoogleOptions) => {
|
||||
: ["email", "profile", "openid"];
|
||||
options.scope && _scopes.push(...options.scope);
|
||||
scopes && _scopes.push(...scopes);
|
||||
if (options.prompt === "select_account+consent")
|
||||
//@ts-expect-error - Google expects there to be a space not `+` in the prompt
|
||||
options.prompt = "select_account consent";
|
||||
const url = await createAuthorizationURL({
|
||||
id: "google",
|
||||
options,
|
||||
|
||||
Reference in New Issue
Block a user