feat: improve authentication
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ export const authenticationService = {
|
||||
* Initialize authentication - get session and available methods
|
||||
*/
|
||||
async start(): Promise<StartResponse> {
|
||||
return fetchWrapper.get('/auth/start', undefined, { skipLogoutOnError: true });
|
||||
return fetchWrapper.get('/auth/start');
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ export const authenticationService = {
|
||||
return fetchWrapper.post('/auth/identify', {
|
||||
session,
|
||||
identity,
|
||||
}, { skipLogoutOnError: true });
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ export const authenticationService = {
|
||||
method,
|
||||
response,
|
||||
...(identity && { identity }),
|
||||
}, { autoRetry: false, skipLogoutOnError: true });
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -57,7 +57,7 @@ export const authenticationService = {
|
||||
session,
|
||||
method,
|
||||
return_url: returnUrl,
|
||||
}, { skipLogoutOnError: true });
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -67,14 +67,14 @@ export const authenticationService = {
|
||||
return fetchWrapper.post('/auth/challenge', {
|
||||
session,
|
||||
method,
|
||||
}, { skipLogoutOnError: true });
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Get current session status
|
||||
*/
|
||||
async getStatus(session: string): Promise<SessionStatus> {
|
||||
return fetchWrapper.get(`/auth/status?session=${encodeURIComponent(session)}`, undefined, { skipLogoutOnError: true });
|
||||
return fetchWrapper.get(`/auth/status?session=${encodeURIComponent(session)}`);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user