fix(auth): redirect to Authelia /logout instead of end-session

This commit is contained in:
Claus Lohmar 2026-06-15 06:48:03 +00:00
parent 8b2ab0c776
commit 44fec75b42

View file

@ -7,7 +7,6 @@ import (
"fmt"
"log/slog"
"net/http"
"net/url"
"os"
"os/signal"
"path/filepath"
@ -133,9 +132,8 @@ func main() {
HttpOnly: true,
SameSite: http.SameSiteStrictMode,
})
// Redirect to Authelia's end session to also clear the Authelia session
logoutURL := fmt.Sprintf("%s/api/oidc/end-session?client_id=%s&post_logout_redirect_uri=%s",
cfg.OIDC.IssuerURL, cfg.OIDC.ClientID, url.QueryEscape(cfg.OIDC.RedirectURL))
// Redirect to Authelia's logout page to clear Authelia session
logoutURL := fmt.Sprintf("%s/logout", cfg.OIDC.IssuerURL)
http.Redirect(w, r, logoutURL, http.StatusFound)
})