Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(auth): reduce verification code rate limit from 60s to 10s
yushende1b7e3377eb
diff --git a/apps/web/app/(auth)/login/page.tsx b/apps/web/app/(auth)/login/page.tsxindex 4f8409d677..de94a4eee6 100644--- a/apps/web/app/(auth)/login/page.tsx+++ b/apps/web/app/(auth)/login/page.tsx@@ -54,7 +54,7 @@ function LoginPageContent() {await sendCode(email);setStep("code");setCode("");- setCooldown(60);+ setCooldown(10);} catch (err) {setError(err instanceof Error ? err.message : "Failed to send code. Make sure the server is running."@@ -118,7 +118,7 @@ function LoginPageContent() {setError("");try {await sendCode(email);- setCooldown(60);+ setCooldown(10);} catch (err) {setError(err instanceof Error ? err.message : "Failed to resend code"diff --git a/server/internal/handler/auth.go b/server/internal/handler/auth.goindex 4575fdea2e..d0e4fedbff 100644--- a/server/internal/handler/auth.go+++ b/server/internal/handler/auth.go@@ -213,9 +213,9 @@ func (h *Handler) SendCode(w http.ResponseWriter, r *http.Request) {return}- // Rate limit: max 1 code per 60 seconds per email+ // Rate limit: max 1 code per 10 seconds per emaillatest, err := h.Queries.GetLatestCodeByEmail(r.Context(), email)- if err == nil && time.Since(latest.CreatedAt.Time) < 60*time.Second {+ if err == nil && time.Since(latest.CreatedAt.Time) < 10*time.Second {writeError(w, http.StatusTooManyRequests, "please wait before requesting another code")return}