[GH-ISSUE #967] Automatically detect BASE_URL #8524

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

Originally created by @AliMejbar on GitHub (Dec 20, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/967

Is this suited for github?

  • Yes, this is suited for github

At the moment it's difficult to setup BASE_URL especially when using preview deployments. It'd be great if better-auth could automatically detect the BASE_URL.

Describe the solution you'd like

Kind of what Authjs is doing.

Describe alternatives you've considered

Each time setting up a BASE_URL environnement variable for each deployement.

Additional context

No response

Originally created by @AliMejbar on GitHub (Dec 20, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/967 ### Is this suited for github? - [X] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. At the moment it's difficult to setup BASE_URL especially when using preview deployments. It'd be great if better-auth could automatically detect the BASE_URL. ### Describe the solution you'd like Kind of what [Authjs](https://authjs.dev/) is doing. ### Describe alternatives you've considered Each time setting up a BASE_URL environnement variable for each deployement. ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 03:37:06 -05:00
Author
Owner

@Bekacru commented on GitHub (Dec 20, 2024):

It does detect automatically. If you're deploying on vercel you can remove it.

<!-- gh-comment-id:2557465127 --> @Bekacru commented on GitHub (Dec 20, 2024): It does detect automatically. If you're deploying on vercel you can remove it.
Author
Owner

@AliMejbar commented on GitHub (Dec 20, 2024):

It does detect automatically. If you're deploying on vercel you can remove it.

It does indeed I just didn't guess it from the docs section https://www.better-auth.com/docs/installation#set-environment-variables. Thank's for your quick response and help.

<!-- gh-comment-id:2557498138 --> @AliMejbar commented on GitHub (Dec 20, 2024): > It does detect automatically. If you're deploying on vercel you can remove it. It does indeed I just didn't guess it from the docs section https://www.better-auth.com/docs/installation#set-environment-variables. Thank's for your quick response and help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8524