fix(OIDC): Use new access_token after refresh (#4853)
Co-authored-by: Ernst Lawende <ernstl@bastion365.nl>
This commit is contained in:
parent
391a5f3bdd
commit
cfa202e89a
@ -147,6 +147,19 @@ function OpenIdConnectRoutes({ oidc, routerBasename, userAuthenticationService }
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const userLoadedHandler = user => {
|
||||
userAuthenticationService.setUser(user);
|
||||
};
|
||||
|
||||
userManager.events.addUserLoaded(userLoadedHandler);
|
||||
|
||||
// Cleanup on component unmount.
|
||||
return () => {
|
||||
userManager.events.removeUserLoaded(userLoadedHandler);
|
||||
};
|
||||
}, []);
|
||||
|
||||
const oidcAuthority = oidc[0].authority;
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user