Skip to content
Snippets Groups Projects
Commit a2c49b60 authored by Leonardo Christino's avatar Leonardo Christino
Browse files

fix(dev): fix dev authentication pathway

parent d331dca4
No related branches found
Tags v1.114.0
No related merge requests found
Pipeline #127559 passed
......@@ -63,15 +63,17 @@ export const useAuth = () => {
const fetchAuthenticated = (input: RequestInfo | URL, init?: RequestInit | undefined): Promise<Response> => {
if (!init) init = fetchSettings;
init.credentials = 'include';
init.redirect = 'follow';
init.method = init.method || 'GET';
init.headers = {
'Content-Type': 'application/json',
sessionid: auth.sessionID || '',
// Authorization: `Bearer ${auth.jwt}`,
...init.headers,
};
if (!import.meta.env.SKIP_LOGIN) {
init.credentials = 'include';
init.redirect = 'follow';
init.method = init.method || 'GET';
init.headers = {
'Content-Type': 'application/json',
sessionid: auth.sessionID || '',
// Authorization: `Bearer ${auth.jwt}`,
...init.headers,
};
}
return fetch(input, init);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment