Add username plugin option to allow the client to change username every x seconds #1502

Closed
opened 2026-03-13 08:43:42 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @PandeoF1 on GitHub (Jul 15, 2025).

Is this suited for github?

  • Yes, this is suited for github

The goal is to disallow the user to change the username every 1 seconds...

And i want to have this parameters directly in the plugin to disallow the user to bypass my front by using the better auth api directly

Describe the solution you'd like

Add a lastUsernameUpdate to the username and a variable in the plugin to store the interval between two update
And at each update, compare them to check if it's under the interval limit

Describe alternatives you've considered

Use ratelimits, but it's dangerous because it can be cleared if the cache is cleared (for memory, redis ect ect)

Additional context

No response

Originally created by @PandeoF1 on GitHub (Jul 15, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. The goal is to disallow the user to change the username every 1 seconds... And i want to have this parameters directly in the plugin to disallow the user to bypass my front by using the better auth api directly ### Describe the solution you'd like Add a lastUsernameUpdate to the username and a variable in the plugin to store the interval between two update And at each update, compare them to check if it's under the interval limit ### Describe alternatives you've considered Use ratelimits, but it's dangerous because it can be cleared if the cache is cleared (for memory, redis ect ect) ### Additional context _No response_
GiteaMirror added the enhancementplugin labels 2026-03-13 08:43:42 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 14, 2025):

Hi, @PandeoF1. I'm Dosu (https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested a plugin feature to limit how often clients can change usernames by adding a configurable interval.
  • The plugin would track the last update time to enforce this limit.
  • This approach aims to prevent users from bypassing front-end restrictions via direct API calls.
  • You prefer this over rate limiting due to concerns about cache clearing making rate limits unreliable.
  • There has been no further activity or comments on this issue.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of better-auth by commenting here.
  • If I don’t hear back within 7 days, this issue will be automatically closed.

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Oct 14, 2025): Hi, @PandeoF1. I'm Dosu (https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested a plugin feature to limit how often clients can change usernames by adding a configurable interval. - The plugin would track the last update time to enforce this limit. - This approach aims to prevent users from bypassing front-end restrictions via direct API calls. - You prefer this over rate limiting due to concerns about cache clearing making rate limits unreliable. - There has been no further activity or comments on this issue. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of better-auth by commenting here. - If I don’t hear back within 7 days, this issue will be automatically closed. Thanks for your understanding and contribution!
Author
Owner

@PandeoF1 commented on GitHub (Oct 14, 2025):

Yes it could be a nice feature

@PandeoF1 commented on GitHub (Oct 14, 2025): Yes it could be a nice feature
Author
Owner

@dosubot[bot] commented on GitHub (Jan 13, 2026):

Hi, @PandeoF1. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested a plugin feature to limit how often clients can change usernames by adding a configurable interval and tracking the last update time.
  • The goal is to prevent bypassing front-end restrictions via direct API calls.
  • The issue was marked as stale due to inactivity.
  • You confirmed that it could be a nice feature.
  • No further updates or developments have occurred since your confirmation.

Next Steps:

  • Please let me know if this feature request is still relevant to the latest version of better-auth by commenting on this issue.
  • If I do not hear back within 7 days, the issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jan 13, 2026): Hi, @PandeoF1. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested a plugin feature to limit how often clients can change usernames by adding a configurable interval and tracking the last update time. - The goal is to prevent bypassing front-end restrictions via direct API calls. - The issue was marked as stale due to inactivity. - You confirmed that it could be a nice feature. - No further updates or developments have occurred since your confirmation. **Next Steps:** - Please let me know if this feature request is still relevant to the latest version of better-auth by commenting on this issue. - If I do not hear back within 7 days, the issue will be automatically closed. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1502