mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 23:53:17 -05:00
fix(email-otp): add stricter default rate limits for password reset endpoints (#7658)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user