Skip to content

Logout fixes: correct client_id + drop pointless ?federated#42

Merged
robmsmt merged 2 commits into
mainfrom
fix/logout-client-id
Jun 15, 2026
Merged

Logout fixes: correct client_id + drop pointless ?federated#42
robmsmt merged 2 commits into
mainfrom
fix/logout-client-id

Conversation

@robmsmt

@robmsmt robmsmt commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #41, which squash-merged the first logout version (read VITE_AUTH0_CLIENT_ID → fell back to a stale baked zIcd… app → Auth0 "Oops, something went wrong").

Two fixes:

1. Correct client_id

Logout now reads AUTH0_CLIENT_ID / AUTH0_DOMAIN from process.env at SSR runtime (same app the server logs in with), with VITE_ as a local-dev fallback. index.astro is prerender = false, so the runtime value wins regardless of what was baked at build time:

  • dev → H9xiOxqgaM9RAmERrjiepeaysysXZHql
  • prod → BJCp2xHTe471QUCKbfKy6F0indSy7Hff

Both already have their logout URLs whitelisted in Auth0. Verified manually: pasting the correct client_id into /v2/logout logs out successfully.

2. Drop ?federated

CILogon's OIDC discovery exposes no end_session_endpoint, so Auth0 federated logout can't terminate its session — ?federated only produced federated_logout_failed log entries. Removed it. Plain Auth0 logout still clears the app + Auth0 session; the CILogon / home-institution SSO session cannot be cleared programmatically (documented limitation of academic federations — users must close the browser for a full SSO logout).

npm run build passes.

🤖 Generated with Claude Code

The deployment configmap/secret expose AUTH0_CLIENT_ID and AUTH0_DOMAIN, not
VITE_AUTH0_* (those are local-dev only). Reading the VITE_ vars would yield
undefined at runtime, breaking the logout URL. Use the non-VITE vars (the same
app the server authenticates with, so logout's client_id matches the session),
with VITE_ as a local-dev fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@robmsmt robmsmt requested a review from loleg June 12, 2026 16:45
CILogon's OIDC discovery exposes no end_session_endpoint, so Auth0 federated
logout cannot end its session — ?federated only produced federated_logout_failed
log noise. Plain Auth0 logout still clears the app + Auth0 session; the
CILogon/institution SSO session cannot be cleared programmatically.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@robmsmt robmsmt changed the title Logout: emit deployed AUTH0_CLIENT_ID (fixes wrong client_id) Logout fixes: correct client_id + drop pointless ?federated Jun 12, 2026
@robmsmt robmsmt merged commit a34562f into main Jun 15, 2026
2 checks passed
@robmsmt robmsmt deleted the fix/logout-client-id branch June 15, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant