fix(auth): only clear NextWks cookie on logout, cant cross-domain
This commit is contained in:
parent
d0dbe9b472
commit
594cf3efe2
1 changed files with 2 additions and 5 deletions
|
|
@ -133,15 +133,12 @@ func main() {
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
SameSite: http.SameSiteLaxMode,
|
SameSite: http.SameSiteLaxMode,
|
||||||
})
|
})
|
||||||
// Clear both NextWks and Authelia session cookies
|
// Clear NextWks session cookie
|
||||||
http.SetCookie(w, &http.Cookie{
|
http.SetCookie(w, &http.Cookie{
|
||||||
Name: "nextwks_session", Value: "", Path: "/", Domain: cfg.OIDC.Domain,
|
Name: "nextwks_session", Value: "", Path: "/", Domain: cfg.OIDC.Domain,
|
||||||
MaxAge: -1, HttpOnly: true, SameSite: http.SameSiteLaxMode,
|
MaxAge: -1, HttpOnly: true, SameSite: http.SameSiteLaxMode,
|
||||||
})
|
})
|
||||||
http.SetCookie(w, &http.Cookie{
|
// Redirect to workspace — no session means redirect to Authelia login
|
||||||
Name: "authelia_session", Value: "", Path: "/", Domain: domainFromURL(cfg.OIDC.IssuerURL),
|
|
||||||
MaxAge: -1, HttpOnly: true, SameSite: http.SameSiteLaxMode,
|
|
||||||
})
|
|
||||||
http.Redirect(w, r, "/", http.StatusFound)
|
http.Redirect(w, r, "/", http.StatusFound)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue