Allow setting hostname for redirectUri
Hey, when better-auth is deployed in a k8s cluster and it gets assigned an origin from ClusterDNS, it constructs a redirectUri like this:
http://auth.auth.svc.cluster.local:3000/auth/callback/google
I am able to just overwrite the redirectUri, but it would be cool if I could just set the origin of the server thats reachable from outside the cluster.
The code change for this should be here I guess: https://github.com/better-auth/better-auth/blob/81ab90865f3e62f760e3d0b470a8ecbb3896e168/packages/better-auth/src/api/routes/callback.ts#L98
Would be pretty nifty to just configure it in a single locationGitHub
better-auth/packages/better-auth/src/api/routes/callback.ts at 81ab...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
Solution:Jump to solution
baseURL exists, whoops. Maybe this should be added to the production docs as a troubleshooting section
1 Reply
Solution
baseURL exists, whoops. Maybe this should be added to the production docs as a troubleshooting section