Skip to content

Commit

Permalink
Update AuthProvider.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini committed Jun 24, 2024
1 parent c2a3ebf commit f5020de
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ export const AuthProvider = ({

const getIdTokenClaims = async () => {
if (authState.isAuthenticated) {
const jwt = await verifyAndExtractToken(idToken, clientId);
return { ...jwt?.payload, [JWT.TOKEN_ID_KEY]: idToken };
try {
const jwt = await verifyAndExtractToken(idToken, clientId);
return { ...jwt?.payload, [JWT.TOKEN_ID_KEY]: idToken };
} catch (_error) {
return {};
}
}
return {};
};
Expand Down

0 comments on commit f5020de

Please sign in to comment.