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:
@@ -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()],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user