diff --git a/apps/web/src/lib/devFetch.ts b/apps/web/src/lib/devFetch.ts index 02b974b..76798a7 100644 --- a/apps/web/src/lib/devFetch.ts +++ b/apps/web/src/lib/devFetch.ts @@ -9,8 +9,9 @@ const originalFetch = window.fetch; * Intentionally mutates window.fetch — this is dev-only (AUTH_DISABLED=true). */ export function installDevFetchInterceptor() { - // In production, Better-Auth handles auth via cookies — no interception needed - if (!import.meta.env.DEV) return; + // Only install if a dev user is selected (localStorage check, not build-time flag). + // This ensures the interceptor runs in deployed dev builds, not just `vite dev`. + if (!getDevUser()) return; window.fetch = function (input: RequestInfo | URL, init?: RequestInit) { const user = getDevUser();