From bc7d546e6477d1df680db9de6ce6178c17465fda Mon Sep 17 00:00:00 2001 From: cclohmar Date: Mon, 15 Jun 2026 08:02:49 +0000 Subject: [PATCH] fix(auth): redirect back to workspace after Authelia logout --- src/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.go b/src/main.go index 9eb9116..f2c1ff5 100644 --- a/src/main.go +++ b/src/main.go @@ -7,6 +7,7 @@ import ( "fmt" "log/slog" "net/http" + "net/url" "os" "os/signal" "path/filepath" @@ -132,8 +133,8 @@ func main() { HttpOnly: true, SameSite: http.SameSiteLaxMode, }) - // Redirect to Authelia's logout page to clear Authelia session - logoutURL := fmt.Sprintf("%s/logout", cfg.OIDC.IssuerURL) + // Redirect to Authelia's logout page, then back to workspace + logoutURL := fmt.Sprintf("%s/logout?rd=%s", cfg.OIDC.IssuerURL, url.QueryEscape(cfg.OIDC.RedirectURL)) http.Redirect(w, r, logoutURL, http.StatusFound) })