Missing Google OAuth 2.0 Account Selection When Multiple Accounts Are Signed In #20762
Replies: 3 comments
-
Immich has no hand in whether a user select screen is shown, this seems like an issue in your config on the oauth provider side. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
On Immich v1.138.0, OAuth reset done, issue persists. Incognito mode (one Google account) logs in fine. Normal mode with multiple accounts skips the selection prompt, login fails (auto-register disabled). Redirect URIs are correct: https://my-domain.com/auth/login, .../user-settings, .../api/oauth/mobile-redirect. Adding ?prompt=select_account causes "Error 400: invalid_request". Can Immich add prompt=select_account to force the account picker? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Missing Google OAuth 2.0 Account Selection When Multiple Accounts Are Signed In
Description
When attempting to log in to Immich via Google OAuth 2.0, the application does not prompt the user to select a Google account if multiple accounts are signed in within the browser or mobile app. Instead, it automatically uses the primary (default) Google account. If this account is not registered in Immich and auto-registering is disabled, the login fails with the error message: "User does not exist and auto registering is disabled."
This behavior causes issues for users who are signed into multiple Google accounts in their browser (e.g., for other applications like Gmail or Google Drive) or in the Immich mobile app. They are not given the option to choose the correct account for Immich, leading to a failed login unless they sign out of other Google accounts or use an incognito browser tab/mobile app instance.
Steps to Reproduce
/auth/login
) on the web or initiate Google OAuth 2.0 login in the Immich mobile app.AUTO REGISTER
is set tofalse
, the error "User does not exist and auto registering is disabled" is displayed.Expected Behavior
prompt=select_account
parameter in the Google OAuth request) on both the web and mobile app.Actual Behavior
Environment
AUTO REGISTER
set tofalse
docker logs immich_server
]Suggested Fix
prompt=select_account
parameter to the Google OAuth 2.0 authentication request to ensure users are prompted to select a Google account, even if multiple accounts are signed in, on both the web and mobile app.Workaround
AUTO REGISTER
resolves the issue but may not be desirable for controlled environments.Additional Context
prompt=select_account
resolved the problem.Thank you for addressing this issue. Please let me know if additional details or logs are needed to assist with debugging.
Beta Was this translation helpful? Give feedback.
All reactions