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:
@@ -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',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user