Skip to content

Send prompt=select_account on browser login - #57

Open
aberoham wants to merge 1 commit into
osodevops:mainfrom
aberoham:fix/login-select-account
Open

Send prompt=select_account on browser login#57
aberoham wants to merge 1 commit into
osodevops:mainfrom
aberoham:fix/login-select-account

Conversation

@aberoham

Copy link
Copy Markdown
Contributor

Fixes #52.

The authorization URL for the browser (auth code + PKCE) flow had no prompt parameter, so a browser with an existing Microsoft session was signed in silently. That made it impossible to sign a second account into another profile through the default flow — teams --profile alt auth login stored a token for the already-signed-in user. Only device code offered an account picker.

The URL now includes prompt=select_account, matching common multi-account CLI behavior. Cost is one extra click per login for single-account users; logins are rare.

URL construction moves into build_authorize_url with tests covering the existing parameters and the new prompt.

cargo fmt, cargo clippy --all-targets -- -D warnings, and cargo test --bins pass (134 tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NXWLJ9g87M3GtLSACr2gmi

The authorization URL had no prompt parameter, so a browser with an
existing Microsoft session was signed in silently. That made it
impossible to sign a second account into another profile through the
default browser flow; only device code offered an account picker. The
URL construction moves into build_authorize_url with tests covering the
existing parameters and the new prompt.

Fixes osodevops#52.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NXWLJ9g87M3GtLSACr2gmi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Browser login cannot select a second account (no prompt=select_account)

1 participant