fix: remove hardcoded baseURL from auth client

NEXT_PUBLIC_ vars are baked in at build time, so NEXT_PUBLIC_APP_URL=localhost
was being embedded in the bundle. Removing baseURL lets better-auth use
window.location.origin automatically, which works correctly on any domain.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-10 21:41:05 -04:00
parent e3b2de5aa2
commit 898422571f
-1
View File
@@ -7,6 +7,5 @@ import { genericOAuthClient } from "better-auth/client/plugins";
* Auth client configuration
*/
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_APP_URL,
plugins: [genericOAuthClient()],
});