feat: Allow rate limiting based on success/failure responses #2688

Open
opened 2026-03-13 10:13:19 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @nikitabraganov on GitHub (Jan 11, 2026).

Originally assigned to: @himself65 on GitHub.

Is this suited for github?

  • Yes, this is suited for github

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

Currently the rate limiting limits all requests, regardless if the request failed or not.

Make it possible to set an option to include both success and failed requests in the rate limiting, or just the failed ones.

Describe alternatives you've considered

Other than custom implemented rate limits, i did not manage to find a solution withing better-auth

Additional context

When i have multiple users under the same IP (perhaps using company IP), sometimes the rate limits for sign-in/sign-up are hit.

Originally created by @nikitabraganov on GitHub (Jan 11, 2026). Originally assigned to: @himself65 on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. _No response_ ### Describe the solution you'd like Currently the rate limiting limits all requests, regardless if the request failed or not. Make it possible to set an option to include both success and failed requests in the rate limiting, or just the failed ones. ### Describe alternatives you've considered Other than custom implemented rate limits, i did not manage to find a solution withing better-auth ### Additional context When i have multiple users under the same IP (perhaps using company IP), sometimes the rate limits for sign-in/sign-up are hit.
GiteaMirror added the enhancement label 2026-03-13 10:13:19 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Jan 11, 2026):

Thank you for your suggestion regarding rate limiting in Better Auth. Currently, there isn't a built-in option to differentiate between success and failure responses for rate limiting; it operates uniformly on all requests [2]. However, you can customize the rate limit settings by passing the rateLimit object to the betterAuth function if you want to adjust the basic configuration [2].

For more advanced customization regarding specific routes, it appears there is an ongoing discussion in the community about implementing enhanced rate limiting features, as previously discussed in other requests [1].

To progress this feature request, it might be helpful to provide more context on specific use cases for your requirement on differentiating rate limits between success and failure responses. What scenarios are you envisioning that would benefit from this functionality?

Feel free to share your thoughts or ask more questions!

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Jan 11, 2026): Thank you for your suggestion regarding rate limiting in Better Auth. Currently, there isn't a built-in option to differentiate between success and failure responses for rate limiting; it operates uniformly on all requests [[2]](https://www.better-auth.com/docs/concepts/rate-limit). However, you can customize the rate limit settings by passing the `rateLimit` object to the `betterAuth` function if you want to adjust the basic configuration [[2]](https://www.better-auth.com/docs/concepts/rate-limit). For more advanced customization regarding specific routes, it appears there is an ongoing discussion in the community about implementing enhanced rate limiting features, as previously discussed in other requests [[1]](https://github.com/better-auth/better-auth/issues/6533). To progress this feature request, it might be helpful to provide more context on specific use cases for your requirement on differentiating rate limits between success and failure responses. What scenarios are you envisioning that would benefit from this functionality? Feel free to share your thoughts or ask more questions! _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) • [Discord](https://discord.gg/fG2XXEuQX3) • [GitHub](https://github.com/Skyvern-AI/Skyvern) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/fG2XXEuQX3) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/Skyvern-AI/Skyvern)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2688