mirror of
https://github.com/hanzoai/iam.git
synced 2026-11-19 18:37:16 +00:00
The session branch learned prompt from the page, so a page that forwarded nothing still got a code from an old session: hanzo.ai's resume for the CLI answered prompt=login and prompt=select_account from whatever it found, and max_age reached neither the page nor the branch. Authorize now records what a request it hands to the hosted page demanded (prompt=login, select_account or several accounts with none named, max_age) as a LoginChallenge of kind prompt, named by the request's client, redirect, state and PKCE challenge, for thirty minutes. The session branch and a silent re-entry of the same request both read it: login is met only by a sign-in made after the request, choose only by a named account, max_age by a sign-in that recent. A store fault refuses. sessions.Open restamps auth_time only when a credential was just shown; a resume (resumeGrant) keeps the old one. Review fixes: logout_hint ends every account it names (an address two orgs share names both, so admin/alice is never the one left signed in); the sign-out walk's chain is sealed with a MAC, so a crafted link cannot skip an origin; the issuer is compared in sign-in origin spelling, so https://hanzo.id:443 is not a second stop; and device approval binds the account its page named. TestBindHasOneCaller walked a symlinked root, which WalkDir does not descend; CI runs the gates from one, so it found no caller there. Claude-Session: https://claude.ai/code/session_015XYKLnBbrbajqj1GpRydF8