feat(web): add same-origin SPA authentication

This commit is contained in:
shaggy (mosaic-dev box)
2026-08-09 20:00:22 -05:00
parent 068d0f9b1c
commit 46d68e1ff4
20 changed files with 987 additions and 143 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
import { createAuthClient } from 'better-auth/react';
import { adminClient, genericOAuthClient } from 'better-auth/client/plugins';
// The gateway and BetterAuth client both use /api/auth. Omitting baseURL keeps
// every browser request on the current origin in development and production.
export const authClient = createAuthClient({
baseURL: process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:14242',
plugins: [adminClient(), genericOAuthClient()],
});