fix(auth): simple logout - clear cookie, redirect to workspace
This commit is contained in:
parent
6bec565b7a
commit
00a252b2e9
1 changed files with 1 additions and 10 deletions
11
src/main.go
11
src/main.go
|
|
@ -132,7 +132,7 @@ func main() {
|
|||
HttpOnly: true,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
})
|
||||
// Clear NextWks session and set force-login flag
|
||||
// Clear NextWks session and redirect to workspace
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: "nextwks_session",
|
||||
Value: "",
|
||||
|
|
@ -142,15 +142,6 @@ func main() {
|
|||
HttpOnly: true,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
})
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: "force_login",
|
||||
Value: "1",
|
||||
Path: "/",
|
||||
Domain: cfg.OIDC.Domain,
|
||||
MaxAge: 300,
|
||||
HttpOnly: true,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
})
|
||||
http.Redirect(w, r, "/", http.StatusFound)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue