fix(auth): logout redirects to workspace, which redirects to Authelia login
This commit is contained in:
parent
2489ac589e
commit
49c4254594
1 changed files with 2 additions and 5 deletions
|
|
@ -7,7 +7,6 @@ import (
|
|||
"fmt"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
|
|
@ -133,10 +132,8 @@ func main() {
|
|||
HttpOnly: true,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
})
|
||||
// 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)
|
||||
// Clear NextWks session, redirect to workspace (no session → Authelia login)
|
||||
http.Redirect(w, r, "/", http.StatusFound)
|
||||
})
|
||||
|
||||
// --- Workspace launcher (public, but OIDC-protected) ---
|
||||
|
|
|
|||
Loading…
Reference in a new issue