10 lines
291 B
TypeScript
10 lines
291 B
TypeScript
import { createAuthClient } from "better-auth/react";
|
|
|
|
const baseURL = typeof window !== "undefined" ? window.location.origin : "http://localhost:3001";
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: baseURL,
|
|
});
|
|
|
|
export const { signUp, signIn, signOut, useSession } = authClient;
|