fix(auth): force re-login via prompt=login for proper logout
This commit is contained in:
parent
bc7d546e64
commit
2489ac589e
1 changed files with 3 additions and 2 deletions
|
|
@ -133,8 +133,9 @@ func main() {
|
|||
HttpOnly: true,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
})
|
||||
// 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))
|
||||
// Clear NextWks session, force re-login via Authelia
|
||||
logoutURL := fmt.Sprintf("%s/api/oidc/authorize?prompt=login&response_type=code&client_id=%s&redirect_uri=%s&scope=openid+profile+email&state=logout&nonce=logout",
|
||||
cfg.OIDC.IssuerURL, url.QueryEscape(cfg.OIDC.ClientID), url.QueryEscape(cfg.OIDC.RedirectURL))
|
||||
http.Redirect(w, r, logoutURL, http.StatusFound)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue