Skip to content

Commit

Permalink
fix else
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Aug 15, 2024
1 parent d9fdfb7 commit abd5d6d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frontend/src/hooks/useAuthSSO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ export const useAuthSSO = (
if (serviceUrl && res.serviceTicket)
// service came to validate session, redirecting back
window.location.href = `${serviceUrl}?ticket=${res.serviceTicket}`;

const res2 = await validateST(res.serviceTicket);
if (res2 instanceof Error) {
return;
else {
const res2 = await validateST(res.serviceTicket);
if (res2 instanceof Error) {
return;
}
setCredentials(res2);
}
setCredentials(res2);
})();
setLoading(false);
}, [code, state, serviceUrl, navigate]);
Expand Down

0 comments on commit abd5d6d

Please sign in to comment.