Repository navigation
fix(identity): ask for credentials on the next sign-in after signing out - #3231
Conversation
An explicit sign-out of an organization server now marks it, and its next sign-in sends prompt=login whatever the caller passes, so the browser's session can't finish it as the account just signed out. A completed sign-in clears the mark. The mark is kept beside the server's records, so it survives a restart. Expiry, refusals and close don't set it. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
A session restored from another Buzz copy is also the chosen account, so it clears the mark too; before, the next renewal still asked for credentials. The docs now say prompt=login asks the provider to authenticate again, which doesn't end the browser's session. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
Review: copy B could read the shared session, copy A then signed out and wrote the mark, and B's late verification installed the session and removed A's mark. The next launch then had no session and no mark, so its sign-in skipped prompt=login. Only a completed browser sign-in now removes the mark. A restored session takes the mark from the file as it is. Tests cover that race and the production sign-in URL after a sign-out and a restart. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 Reviewed at 77d63c6. Both previous findings are resolved; no new actionable findings.
Restoring an existing session now preserves and rereads the sign-out marker, while guarded completion of a browser login owns clearing it. The added regressions exercise the production sign-in URL and the stale-restore/sign-out interleaving. All 151 identity tests passed; controls that reintroduced marker deletion, bypassed request policy, or removed clearing/rereading failed as expected. Eight isolated host-integration probes also passed.
The documented already-running-copy cache limitation remains. Full local package validation was incomplete due to a terminal-environment failure and subsequent SIGSEGV, with attribution to this change unestablished. Native UI, real provider/OS credential storage, and actual process restart/concurrency remain unverified. Approved with these validation limitations noted.
* origin/main: fix(identity): show a backed-up key as backed up, and drop dead retries (block#3223) fix(browser): open Builderlab account connections in the system browser (block#3287) Expose exact captured-message reads (block#3264) docs(agents): keep internal discussion out of public repo content (block#3258) fix(identity): clear a copied private key, name restore failures, fix storage copy (block#3236) fix(channels): list workspaces that load after `#` opens (block#3277) feat(profiles): show a larger avatar in the hover profile preview (block#3232) fix(identity): ask for credentials on the next sign-in after signing out (block#3231) fix(relay): keep saved channels when the community refuses sign-in (block#3215) Signed-off-by: Joah Gerstenberg <[email protected]>
Summary
prompt=loginonly when the caller asked for it, and only first run's Use a different account did.prompt=loginwhatever the caller passes, which asks the sign-in provider to authenticate again. The provider decides what the browser shows; this doesn't end the browser's session there. Only a completed browser sign-in clears the mark. The mark survives a restart, so sign out, quit, then sign in still asks for credentials. Expiry, refusals and close don't set it, so renewing the same account stays one click. No UI change.Details
src-tauri/src/federated_identity/mod.rs:State::force_loginholds the mark.begin_sign_outsets it, in the same lock as the retirement. Both explicit sign-out paths use it: the plain one andAgentTokens::sign_out.finish_login, in the same lock). A session restored from another Buzz copy takes the mark from the file as it is (reread_signed_out): that session may have been checked before another copy's sign-out, so a restore never erases the mark. A sign-in that a sign-out superseded never installs, so it never clears a newer mark. A failed or canceled sign-in keeps it.sign_inapplies it when it admits the attempt (State::asking). The caller'ssignuphint stays.<account>.signed-outbeside the server's FI records, the same pattern as the.customerslist. It is written or removed in the state lock, so the file follows the order of sign-outs and installs. A launch reads it inbuild. Tests pass no path, as withCustomers.docs/identity.mdanddocs/buzz-help.mddescribe the rule.prompt=login.sign_instart URL hasprompt=loginafter a sign-out and after a restart, and not before a sign-out.prompt=login.Known limits
force_loginaddsprompt=login.🤖 Generated with Claude Code