Skip to content

Commit

Permalink
Merge branch 'bugfix/use-access-token-instead-of-id-token' into q/124.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-e committed Nov 29, 2022
2 parents 9aeb7a5 + 685318e commit 8a49c28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shell-ui/src/auth/AuthProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ function OAuth2AuthProvider({ children }: { children: Node }) {

//Force logout on silent renewal error
useEffect(() => {
const onSilentRenewError = (err) => {
console.log("log out following to silent renewal error", err)
const onSilentRenewError = (err) => {
console.log('log out following to silent renewal error', err);
logOut();
};
userManager.events.addSilentRenewError(onSilentRenewError);
Expand Down Expand Up @@ -121,13 +121,13 @@ export function useAuth(): {
}

//Force logout when token is expired or we are missing expires_at claims
if(auth.userData.expired || !auth.userData.expires_at) {
if (auth.userData.expired || !auth.userData.expires_at) {
auth.userManager.revokeAccessToken();
}

return {
userData: {
token: auth.userData.id_token,
token: auth.userData.access_token,
username: auth.userData.profile?.name,
email: auth.userData.profile?.email,
groups: getUserGroups(auth.userData, config.userGroupsMapping),
Expand Down

0 comments on commit 8a49c28

Please sign in to comment.