feat: improve authentication
All checks were successful
Build Test / build (pull_request) Successful in 43s
JS Unit Tests / test (pull_request) Successful in 41s
PHP Unit Tests / test (pull_request) Successful in 49s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-02-19 23:03:09 -05:00
parent decda8becc
commit 99fa707eb3
7 changed files with 194 additions and 175 deletions

View File

@@ -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)}`);
},
/**