[PR #7658] [MERGED] fix(email-otp): add stricter default rate limits for password reset endpoints #15719

Closed
opened 2026-04-13 10:11:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7658
Author: @bytaesu
Created: 1/28/2026
Status: ✅ Merged
Merged: 1/28/2026
Merged by: @himself65

Base: canary ← Head: 2026-01-28/fix/email-otp-rate-limit


📝 Commits (1)

  • 04ee3a8 fix(email-otp): add stricter default rate limits for password reset endpoints

📊 Changes

1 file changed (+21 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/email-otp/index.ts (+21 -0)

📄 Description

Seeing the others applied, these were probably missed


Summary by cubic

Adds default rate limits to email OTP password reset endpoints to reduce abuse. Applies a 60s window with a max of 3 requests per endpoint.

  • Bug Fixes
    • Added rate limit for /email-otp/request-password-reset: 60s window, max 3.
    • Added rate limit for /email-otp/reset-password: 60s window, max 3.
    • Added rate limit for /forget-password/email-otp: 60s window, max 3.

Written for commit 04ee3a8eee. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7658 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 1/28/2026 **Status:** ✅ Merged **Merged:** 1/28/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `2026-01-28/fix/email-otp-rate-limit` --- ### 📝 Commits (1) - [`04ee3a8`](https://github.com/better-auth/better-auth/commit/04ee3a8eee3feed240af3881b17b3e7b601f9415) fix(email-otp): add stricter default rate limits for password reset endpoints ### 📊 Changes **1 file changed** (+21 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+21 -0) </details> ### 📄 Description Seeing the others applied, these were probably missed <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds default rate limits to email OTP password reset endpoints to reduce abuse. Applies a 60s window with a max of 3 requests per endpoint. - **Bug Fixes** - Added rate limit for /email-otp/request-password-reset: 60s window, max 3. - Added rate limit for /email-otp/reset-password: 60s window, max 3. - Added rate limit for /forget-password/email-otp: 60s window, max 3. <sup>Written for commit 04ee3a8eee3feed240af3881b17b3e7b601f9415. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 10:11:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#15719