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"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
@ -133,10 +132,8 @@ func main() {
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
SameSite: http.SameSiteLaxMode,
|
SameSite: http.SameSiteLaxMode,
|
||||||
})
|
})
|
||||||
// Clear NextWks session, force re-login via Authelia
|
// Clear NextWks session, redirect to workspace (no session → Authelia login)
|
||||||
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",
|
http.Redirect(w, r, "/", http.StatusFound)
|
||||||
cfg.OIDC.IssuerURL, url.QueryEscape(cfg.OIDC.ClientID), url.QueryEscape(cfg.OIDC.RedirectURL))
|
|
||||||
http.Redirect(w, r, logoutURL, http.StatusFound)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// --- Workspace launcher (public, but OIDC-protected) ---
|
// --- Workspace launcher (public, but OIDC-protected) ---
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue