fix(email-otp): add stricter default rate limits for password reset endpoints (#7658)

This commit is contained in:
Taesu
2026-01-28 17:06:03 -08:00
committed by Alex Yang
parent 12631bbcb7
commit dcc289e49d
@@ -141,6 +141,27 @@ export const emailOTP = (options: EmailOTPOptions) => {
window: 60,
max: 3,
},
{
pathMatcher(path) {
return path === "/email-otp/request-password-reset";
},
window: 60,
max: 3,
},
{
pathMatcher(path) {
return path === "/email-otp/reset-password";
},
window: 60,
max: 3,
},
{
pathMatcher(path) {
return path === "/forget-password/email-otp";
},
window: 60,
max: 3,
},
],
options,
} satisfies BetterAuthPlugin;