fix: route web auth through same origin

This commit is contained in:
-Puter
2026-07-29 17:01:22 +05:30
parent 3ffa1cfc7c
commit 7668fa69cc
2 changed files with 5 additions and 7 deletions

View File

@@ -1,8 +1,7 @@
import { env } from "@code/env/web";
import { convexClient } from "@convex-dev/better-auth/client/plugins";
import { createAuthClient } from "better-auth/react";
export const authClient = createAuthClient({
baseURL: env.VITE_AUTH_URL,
baseURL: typeof window === "undefined" ? undefined : window.location.origin,
plugins: [convexClient()],
});