fix(GRO-1592): fallback auth baseURL to window.location.origin #15

Merged
The Dogfather merged 3 commits from fix/gro-1592-sso-session-cookie into dev 2026-05-23 14:13:01 +00:00
Showing only changes of commit 35d31a984d - Show all commits
+1 -1
View File
@@ -1,7 +1,7 @@
import { createAuthClient } from "better-auth/react";
export const authClient = createAuthClient({
baseURL: import.meta.env.VITE_API_URL ?? "",
baseURL: import.meta.env.VITE_API_URL || (typeof window !== "undefined" ? window.location.origin : ""),
});
export const { signIn, signOut, useSession, changePassword } = authClient;