improvement: add more aggressive rate limiting to verify endpoints

This commit is contained in:
Scott Wilson
2025-06-23 10:27:36 -07:00
parent 4a09fc5e63
commit 647e13d654
3 changed files with 10 additions and 4 deletions
@@ -107,7 +107,9 @@ export const registerPasswordRouter = async (server: FastifyZodProvider) => {
method: "POST",
url: "/email/password-reset-verify",
config: {
rateLimit: authRateLimit
rateLimit: smtpRateLimit({
keyGenerator: (req) => (req.body as { email?: string })?.email?.trim().substring(0, 100) ?? req.realIp
})
},
schema: {
body: z.object({