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

fix(dev): fix dev authentication pathway

parent fcce6ff0
No related branches found
No related tags found
No related merge requests found
......@@ -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