Skip to content

Commit

Permalink
error handling for keycloak auth failure
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisgsmith committed Aug 14, 2024
1 parent ab980a4 commit 4e2a648
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/userService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ _kc.onTokenExpired = () => {
_kc.updateToken(50);
};

_kc.onAuthError = () => {
try {
doLogout();
} catch (err) {
console.error(err);
}
};

_kc.onAuthRefreshError = () => {
doLogout();
try {
doLogout();
} catch (err) {
console.error(err);
}
};

0 comments on commit 4e2a648

Please sign in to comment.