From 3e76c41a9c7425dd25792c563a2b71cc11b87519 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 7 Jan 2026 03:42:18 +0000 Subject: [PATCH] Show error when credentials are invalid --- endpoint.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/endpoint.go b/endpoint.go index 19b78321..29f709fc 100644 --- a/endpoint.go +++ b/endpoint.go @@ -274,7 +274,11 @@ func postSignin(w http.ResponseWriter, r *http.Request) { _, err := auth.SigninUser(r, username, password) if err != nil { if errors.Is(err, auth.InvalidCredentials{}) { - http.Redirect(w, r, "/?error=invalid-credentials", http.StatusFound) + http.Redirect(w, r, "/signin?error=invalid-credentials", http.StatusFound) + return + } + if errors.Is(err, auth.InvalidUsername{}) { + http.Redirect(w, r, "/signin?error=invalid-credentials", http.StatusFound) return } respondError(w, "Failed to signin user", err, http.StatusInternalServerError)