- Add docker-compose.prod.yml and Caddyfile for Caddy reverse proxy - Add production stages to frontend Dockerfile (nginx for static files) - Fix monorepo package exports for production builds (dist/src paths) - Add CORS_ORIGIN env var for cross-origin config - Add Better Auth baseURL, cookie domain, and trusted origins from env - Use VITE_API_URL for API calls in auth-client and play route - Add credentials: include for cross-origin fetch requests - Remove unused users table from schema
7 lines
235 B
TypeScript
7 lines
235 B
TypeScript
import { createAuthClient } from "better-auth/react";
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: import.meta.env["VITE_API_URL"] || "http://localhost:3000",
|
|
});
|
|
|
|
export const { signIn, signOut, useSession } = authClient;
|