fix(auth): redirect to Authelia /logout instead of end-session
This commit is contained in:
parent
8b2ab0c776
commit
44fec75b42
1 changed files with 2 additions and 4 deletions
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
@ -133,9 +132,8 @@ func main() {
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
SameSite: http.SameSiteStrictMode,
|
SameSite: http.SameSiteStrictMode,
|
||||||
})
|
})
|
||||||
// Redirect to Authelia's end session to also clear the Authelia session
|
// Redirect to Authelia's logout page to clear Authelia session
|
||||||
logoutURL := fmt.Sprintf("%s/api/oidc/end-session?client_id=%s&post_logout_redirect_uri=%s",
|
logoutURL := fmt.Sprintf("%s/logout", cfg.OIDC.IssuerURL)
|
||||||
cfg.OIDC.IssuerURL, cfg.OIDC.ClientID, url.QueryEscape(cfg.OIDC.RedirectURL))
|
|
||||||
http.Redirect(w, r, logoutURL, http.StatusFound)
|
http.Redirect(w, r, logoutURL, http.StatusFound)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue