From 2c64ab9e98be90d4d819bf91dfc0b0466f9ff95c Mon Sep 17 00:00:00 2001 From: Barcode Betty Date: Mon, 30 Mar 2026 15:50:51 +0000 Subject: [PATCH] fix: use same-origin default for auth URL instead of localhost Avoids ERR_CONNECTION_REFUSED in deployed environments where VITE_AUTH_URL is not set at build time. Empty-string fallback routes auth requests to same origin, which the HTTPRoute forwards to the auth service. cc @cpfarhood Co-Authored-By: Paperclip --- src/lib/auth-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/auth-client.ts b/src/lib/auth-client.ts index a6fe18f..40a8d1f 100644 --- a/src/lib/auth-client.ts +++ b/src/lib/auth-client.ts @@ -1,7 +1,7 @@ import { createAuthClient } from "better-auth/react" export const authClient = createAuthClient({ - baseURL: import.meta.env.VITE_AUTH_URL ?? "http://localhost:3001", + baseURL: import.meta.env.VITE_AUTH_URL || "", basePath: "/auth", })