mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-25 15:17:23 +00:00
Tokens under the `oidc-state` scope share one signing key, so the payload is what says which job a token belongs to. The popup-return proof now carries a `purpose` claim, and each verifier accepts exactly one kind of token. The return leg also sets a single-use companion cookie, mirroring the nonce `/start` already uses, and stamps the action its redirect lands on. Redeeming a proof requires the matching cookie — consumed on success only, so a rejected call can't invalidate an in-flight return — and the popup honors only a proof minted for its own action. The cookie is host-only, so `/auth/oidc/verify-popup-return` is also served on the GUI origin and the popup redeems it same-origin. The return leg always lands the popup on `config.origin`, where both the cookie and the route live.