-
Notifications
You must be signed in to change notification settings - Fork 0
Add rate limiting to auth endpoints #4
Copy link
Copy link
Open
Labels
P1: highHigh priority — blocks users or core workflowHigh priority — blocks users or core workflowarea: authAuthentication and authorizationAuthentication and authorizationsize: MMedium — 1-2 daysMedium — 1-2 daystype: securitySecurity vulnerability or hardeningSecurity vulnerability or hardening
Milestone
Description
Metadata
Metadata
Assignees
Labels
P1: highHigh priority — blocks users or core workflowHigh priority — blocks users or core workflowarea: authAuthentication and authorizationAuthentication and authorizationsize: MMedium — 1-2 daysMedium — 1-2 daystype: securitySecurity vulnerability or hardeningSecurity vulnerability or hardening
Projects
StatusShow more project fields
Todo
Problem
The auth endpoints (login, register, password reset) have no rate limiting beyond the 5-minute token resend cooldown. This makes the application vulnerable to brute-force attacks, credential stuffing, and abuse of the email sending functionality.
Proposed Implementation
Option A: Vercel Edge Config + KV Rate Limiter
Use
@vercel/kvor@upstash/ratelimitfor serverless-compatible rate limiting:Option B: In-Memory Rate Limiting (simpler)
Use a Map-based rate limiter for development, with a note to upgrade to distributed rate limiting in production.
Option A is recommended for production.
Acceptance Criteria