History

cloud: end the WorkOS session on sign out

Logout only cleared the local sealed-session cookie; the hosted AuthKit session survived, so the next Sign in silently re-authenticated without credentials (#1445). Follow WorkOS's documented sign-out: extract the session id from the sealed cookie locally (plain JWT decode, no verification, so an expired token still signs out), 302 through the WorkOS logout endpoint to end the session upstream, and land back on the public homepage via return_to. If the cookie will not unseal, fall back to the old redirect-to-/ so local sign-out always completes. The shell submits sign-out as a top-level form POST instead of fetch so the browser navigation carries WorkOS's cookies through the hop. Needs @executor-js/emulate 0.13.6 (the emulator's session-end route).

Rhys Sullivan committed 3 months ago

Commit 00a15021 parent 7d6fcea7 files · +119 −18Browse files

Showing the changes to e2e/package.json (1 of 7 files). Show all

Unified · Split

e2e/package.json+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
22 },22 },
23 "dependencies": {23 "dependencies": {
24 "@executor-js/api": "workspace:*",24 "@executor-js/api": "workspace:*",
25 "@executor-js/emulate": "^0.13.3",25 "@executor-js/emulate": "^0.13.6",
26 "@executor-js/mcporter": "^0.11.4",26 "@executor-js/mcporter": "^0.11.4",
27 "@executor-js/plugin-graphql": "workspace:*",27 "@executor-js/plugin-graphql": "workspace:*",
28 "@executor-js/plugin-mcp": "workspace:*",28 "@executor-js/plugin-mcp": "workspace:*",