From 2a74cb7b40bab4241adf119f8e966e27bfa4f07f Mon Sep 17 00:00:00 2001 From: Brandyn / Techy Date: Sat, 31 Oct 2026 15:11:53 -0500 Subject: [PATCH] Logout ends the Authentik session: copyparty idp-logout -> outpost sign_out; live portal Sign out link Co-Authored-By: Claude Fable 5.1 --- README.md | 2 ++ configure.py | 1 + live/src/App.jsx | 1 + live/src/styles.css | 2 ++ 4 files changed, 6 insertions(+) diff --git a/README.md b/README.md index d500d08..9e783fc 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,8 @@ Design: **Authentik authenticates once for the whole domain; Caddy authorizes pe the matching access on next login; removing it removes it. copyparty additionally requires a header with a secret name that only Caddy adds (`idp-h-key`, `COPYPARTY_IDP_KEY` in `.env`), so identity headers cannot be forged even if copyparty were reached directly. + Logout: copyparty's logout link and the live portal's "Sign out" go to `/outpost.goauthentik.io/sign_out`, + which ends the Authentik session (a local app logout alone would be undone on the next request). 5. Debug: `https://HOST/whoami` prints the username/groups headers exactly as the apps receive them. Group changes in Authentik apply on the next login — log out at `https://auth.HOST/` and back in. 6. Test in a private window: `https://live.HOST/` → Discord login → portal; `https://bot.HOST/` → 403 unless diff --git a/configure.py b/configure.py index cb6ad46..642d81e 100755 --- a/configure.py +++ b/configure.py @@ -398,6 +398,7 @@ def write_copyparty(): idp-h-usr: X-Authentik-Username idp-h-grp: X-Authentik-Groups idp-h-key: X-Vanguard-{key} # header Caddy inserts on every request; IdP headers are ignored without it + idp-logout: /outpost.goauthentik.io/sign_out # copyparty's logout link ends the Authentik session (not just its own cookie) no-robots name: vanguard diff --git a/live/src/App.jsx b/live/src/App.jsx index 52564e3..d3c121e 100644 --- a/live/src/App.jsx +++ b/live/src/App.jsx @@ -59,6 +59,7 @@ export default function App() { + Sign out {mode === 'golive' ? ( { audio.followFocus(); setMode('watch') }} /> diff --git a/live/src/styles.css b/live/src/styles.css index 4abe013..cf2d6ee 100644 --- a/live/src/styles.css +++ b/live/src/styles.css @@ -56,3 +56,5 @@ html, body, #root { height:100%; margin:0; background:var(--bg); color:var(--fg) .golive-form .warn-box { background:#3a2a10; border:1px solid #f1c40f; color:#ffe9a8; border-radius:8px; padding:10px 12px; font-size:13px; line-height:1.5; } .golive-form .warn-box b { color:#fff; } .golive-stats .rec { background:#f1c40f; color:#000; font-weight:700; font-size:11px; padding:2px 6px; border-radius:4px; } +.topbar a.signout { color:var(--mut); font-size:13px; text-decoration:none; border:1px solid #3a3a3a; border-radius:6px; padding:5px 10px; } +.topbar a.signout:hover { color:var(--fg); border-color:#666; }