Keep accounts in the switcher across logout and account creation (#3683)
- Keep accounts in the switcher across logout and account creation
Logging out of the active account now leaves it listed in the account switcher as signed out, instead of dropping it, while still handing off to the next usable account. A logout that leaves nothing to switch to keeps the list unless it only ever held that one account.
/logout gains "Log Out of All Accounts", which ends every session in the browser and either keeps the accounts listed (signed out) or, if asked, forgets them. Creating an account while logged in now demotes the current account into the switcher rather than silently replacing it, and /manage/accounts links to account creation and logout.
Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com
- Abort logout when a session can't be revoked
Logging out now destroys stored sessions by their handle rather than only when they validate from the current request, so an IP-bound session from another network is revoked too. If a session can't be destroyed, logout stops before handing off or rewriting cookies, and the page reports the failure. The log-out-all option only appears when another account is actually signed in.
Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com