From 594cf3efe2dd3cbed13429b2dcf821ca4c607669 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Mon, 15 Jun 2026 08:19:44 +0000 Subject: [PATCH] fix(auth): only clear NextWks cookie on logout, cant cross-domain --- src/main.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main.go b/src/main.go index 43a65f5..ac89b52 100644 --- a/src/main.go +++ b/src/main.go @@ -133,15 +133,12 @@ func main() { HttpOnly: true, SameSite: http.SameSiteLaxMode, }) - // Clear both NextWks and Authelia session cookies + // Clear NextWks session cookie http.SetCookie(w, &http.Cookie{ Name: "nextwks_session", Value: "", Path: "/", Domain: cfg.OIDC.Domain, MaxAge: -1, HttpOnly: true, SameSite: http.SameSiteLaxMode, }) - http.SetCookie(w, &http.Cookie{ - Name: "authelia_session", Value: "", Path: "/", Domain: domainFromURL(cfg.OIDC.IssuerURL), - MaxAge: -1, HttpOnly: true, SameSite: http.SameSiteLaxMode, - }) + // Redirect to workspace — no session means redirect to Authelia login http.Redirect(w, r, "/", http.StatusFound) })