From 3288624cf21e07fa2d135c3caa986ddabeb19cb2 Mon Sep 17 00:00:00 2001 From: yusing Date: Sat, 13 Sep 2025 23:21:58 +0800 Subject: [PATCH] refactor(auth): change PostAuthCallbackHandler to redirect to home page instead of sending OK status --- internal/auth/userpass.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/auth/userpass.go b/internal/auth/userpass.go index 52f13f24..5ec61f1c 100644 --- a/internal/auth/userpass.go +++ b/internal/auth/userpass.go @@ -125,7 +125,7 @@ func (auth *UserPassAuth) PostAuthCallbackHandler(w http.ResponseWriter, r *http return } SetTokenCookie(w, r, auth.TokenCookieName(), token, auth.tokenTTL) - w.WriteHeader(http.StatusOK) + http.Redirect(w, r, "/", http.StatusFound) } func (auth *UserPassAuth) LoginHandler(w http.ResponseWriter, r *http.Request) {