fix(auth): change userpass to redirect to login and update documentation

This commit is contained in:
yusing
2025-09-14 21:11:20 +08:00
parent 025ebab1ce
commit 8b8969f033
5 changed files with 7 additions and 19 deletions

View File

@@ -129,8 +129,7 @@ func (auth *UserPassAuth) PostAuthCallbackHandler(w http.ResponseWriter, r *http
}
func (auth *UserPassAuth) LoginHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("X-Redirect-To", "/login")
w.WriteHeader(http.StatusForbidden)
http.Redirect(w, r, "/login", http.StatusFound)
}
func (auth *UserPassAuth) LogoutHandler(w http.ResponseWriter, r *http.Request) {