Google sign-in skips account chooser after sign-out (missing prompt=select_account)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- api, authentication
Research direction
Start in crates/services/src/auth/oauth.rs by reading google_auth_url and the current GET /v1/auth/google flow. Verify the generated Google authorization URL, apply the requested account-chooser behavior, and confirm that signing in again after sign-out presents the chooser; review github_auth_url separately because the issue describes that change as optional.
Written by the indexing model from the issue text.
Description
Problem
After signing out of NEAR AI Cloud and signing back in with Google, users are not shown the Google account chooser. Google silently re-selects the previously used account, so there is no way to switch to a different Google account without signing out of Google itself.
The chooser only appears on the very first sign-in (before the user has granted consent to the app).
Cause
The Google authorization URL built in crates/services/src/auth/oauth.rs (google_auth_url) does not set a prompt parameter. The redirect currently issued by GET /v1/auth/google contains only:
response_type, client_id, state, code_challenge, code_challenge_method, redirect_uri, scope=email openid profile
Without prompt, Google skips the account chooser whenever the user has an active Google session and has already consented.
The frontend cannot work around this: /v1/auth/google only accepts frontend_callback (OAuthInitQuery) and does not forward other query parameters to Google.
Proposed fix
Add prompt=select_account to the Google authorization URL:
.set_pkce_challenge(pkce_challenge)
.add_extra_param("prompt", "select_account")
.url();
select_account shows the chooser on every sign-in without forcing the consent screen again. nearai/agents-market-v2 already does this in crates/services/src/oauth/google.rs.
GitHub has the same behavior, and GitHub's authorize endpoint also supports prompt=select_account, so github_auth_url could get the same change.
Steps to reproduce
- Sign in to NEAR AI Cloud with Google (account chooser appears).
- Sign out.
- Click "Sign in with Google" again.
- Expected: Google account chooser appears. Actual: Google auto-selects the previous account and signs in immediately.
- Dominant language
- Rust
- Stars
- 8
- Forks
- 8
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 37
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nearai/cloud-api
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
All issues in nearai/cloud-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100