Restore cookies with API calls

Ensure fetch requests always include credentials to maintain session cookies after login and TOTP flows.

X-Lovable-Edit-ID: edt-bd4a695e-663c-4919-a238-aa222a5c0609
This commit is contained in:
gpt-engineer-app[bot]
2026-01-15 22:46:27 +00:00
+1
View File
@@ -195,6 +195,7 @@ async function request<T>(
const response = await fetch(`${config.api.baseUrl}${endpoint}`, { const response = await fetch(`${config.api.baseUrl}${endpoint}`, {
...options, ...options,
headers, headers,
credentials: 'include', // Always include cookies for session consistency
cache: 'no-store', cache: 'no-store',
}); });