fix(auth): redirect back to workspace after Authelia logout
This commit is contained in:
parent
b5ed7e2364
commit
bc7d546e64
1 changed files with 3 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
"fmt"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
|
|
@ -132,8 +133,8 @@ func main() {
|
|||
HttpOnly: true,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
})
|
||||
// Redirect to Authelia's logout page to clear Authelia session
|
||||
logoutURL := fmt.Sprintf("%s/logout", cfg.OIDC.IssuerURL)
|
||||
// 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))
|
||||
http.Redirect(w, r, logoutURL, http.StatusFound)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue