Skip to content

Commit

Permalink
Update AuthContext.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
bsu3338 authored Jul 28, 2023
1 parent 5b52d26 commit 50288e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/hooks/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ const AuthContextProvider = ({
console.log('Failed to refresh:', refreshError);
}
};
window.addEventListener('intercept401', handleUnauthorized);
window.addEventListener('attemptRefresh', handleUnauthorized);
return () => {
window.removeEventListener('intercept401', handleUnauthorized);
window.removeEventListener('attemptRefresh', handleUnauthorized);
};
}, [silentRefresh]);

Expand Down

0 comments on commit 50288e5

Please sign in to comment.