mirror of
https://github.com/hanzoai/iam.git
synced 2026-11-19 18:37:16 +00:00
v1.34.158 judged sign-out by the rule for every other cookie write, which asks for a JSON body. @hanzo/iam end() and iam-sdk logout() post a form, or nothing, from the issuer's own page, so sign-out answered 403 and the session stayed alive. A relying party's POST sign-out form (RP-Initiated Logout 1.0 §2) was refused the same way. Sign-out now has its own rule, Request.ends: it refuses only what the browser says another page sent without navigating here (an image, a frame, a script's fetch). Everything the issuer's pages send ends the sessions, whatever the body, and so does a GET or POST navigation. A browser with no Fetch Metadata is believed. Every other cookie write still needs the issuer's page and a JSON body. A browser with no Fetch Metadata (Safari before 16.4, Firefox before 90, a proxy that strips it) was refused on every write. Its Origin is now compared with the Host header: the same host over https counts as the issuer's page, and any other origin counts as cross-site. A request with neither header came from no page. The checks read sessions.Request, a value holding the method, Fetch Metadata, Origin, Host and Content-Type. The typed handlers bind Origin and Host next to Sec-Fetch-Site. Co-authored-by: Hanzo Dev <[email protected]>