Skip to content

Commit

Permalink
fix: mark session as expired when JWT does not validate (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini authored Jun 24, 2024
1 parent 1b07ca8 commit 4c5fc6f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ export const AuthProvider = ({
logoutReason: "",
userId: jwt.payload[JWT.USER_ID_KEY] as string,
});
} else {
setAuthState({
isAuthenticated: false,
logoutReason: EXPIRED_SESSION,
userId: "",
});
}
} catch (_error) {
setAuthState({
Expand Down

0 comments on commit 4c5fc6f

Please sign in to comment.