[GH-ISSUE #1056] feat: add an easy object to disable certain routes. #8569

Closed
opened 2026-04-13 03:41:19 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Scooter1337 on GitHub (Dec 28, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1056

Is this suited for github?

  • Yes, this is suited for github

Even though I do not use social providers, the route is still in openAPI (not an issue per se), but also still open to the public. Disabling routes would be a nice feature to have built-in.

Describe the solution you'd like

Ability to disable routes, and choose an error (per route || global) to throw.

Describe alternatives you've considered

  • plugin
  • check if the route is in a set of disabled routes before passing onto the handler in encapsulating rest api

Additional context

No response

Originally created by @Scooter1337 on GitHub (Dec 28, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1056 ### Is this suited for github? - [X] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Even though I do not use social providers, the route is still in openAPI (not an issue per se), but also still open to the public. Disabling routes would be a nice feature to have built-in. ### Describe the solution you'd like Ability to disable routes, and choose an error (per route || global) to throw. ### Describe alternatives you've considered - plugin - check if the route is in a set of disabled routes before passing onto the handler in encapsulating rest api ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 03:41:19 -05:00
Author
Owner

@Bekacru commented on GitHub (Mar 26, 2025):

You can pass disabledPaths in the auth config to achieve this

<!-- gh-comment-id:2753364348 --> @Bekacru commented on GitHub (Mar 26, 2025): You can pass `disabledPaths` in the auth config to achieve this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8569