[GH-ISSUE #5414] Let the choice of paths be free #10236

Closed
opened 2026-04-13 06:13:31 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @MoFerhat on GitHub (Oct 19, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/5414

Is this suited for github?

  • Yes, this is suited for github

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

Why do we need to create a file named auth.ts in one of the following locations

Project root
lib/ folder
utils/ folder

and not, for example, in a folder I might call "dingdong"?

Describe the solution you'd like

I think it should be free to choose to place the files in any folder.

Describe alternatives you've considered

I think it should be free to choose to place the files in any folder.

Additional context

No response

Originally created by @MoFerhat on GitHub (Oct 19, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/5414 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Why do we need to create a file named auth.ts in one of the following locations Project root lib/ folder utils/ folder and not, for example, in a folder I might call "dingdong"? ### Describe the solution you'd like I think it should be free to choose to place the files in any folder. ### Describe alternatives you've considered I think it should be free to choose to place the files in any folder. ### Additional context _No response_
GiteaMirror added the enhancementlocked labels 2026-04-13 06:13:31 -05:00
Author
Owner

@ping-maxwell commented on GitHub (Oct 19, 2025):

You can choose to place it anywhere.
The difference is when using the Better-Auth CLI you will need to include a --config flag to point to your auth config. (docs)

<!-- gh-comment-id:3419776246 --> @ping-maxwell commented on GitHub (Oct 19, 2025): You can choose to place it anywhere. The difference is when using the Better-Auth CLI you will need to include a `--config` flag to point to your auth config. ([docs](https://www.better-auth.com/docs/concepts/cli#generate))
Author
Owner

@MoFerhat commented on GitHub (Oct 19, 2025):

Oh yeah, great! Thanks @ping-maxwell , I must have skipped that part of the documentation.

<!-- gh-comment-id:3419902785 --> @MoFerhat commented on GitHub (Oct 19, 2025): Oh yeah, great! Thanks @ping-maxwell , I must have skipped that part of the documentation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10236