Describe the bug
As the title said when the auth_token expire and the client oidc and call a silent refresh it does not reload all the claims, but only the claims related to the auth_token
To Reproduce
Steps to reproduce the behavior:
1, In AuthConfig set a low timeoutFactor (like 0.05)
Expected behavior
All the claims must be reloaded
Desktop (please complete the following information):
Quick question: would you consider this possibly related to- or even a duplicate of #514?
Hi,
I forgot to mention in the post:
This problem occur in a project that use implict-flow
I see the same problem in a project with Code flow.
I doubt it is related to #514 because the problem (bug?) is different. In my case it does not reload the claims at all, if I force the reload the claims are correct
A possible workaround is this:
this.oauthService.events.subscribe(event => {
if (['silently_refreshed', 'token_refreshed'].indexOf(event.type) > -1) {
this.oauthService.loadUserProfile();
}
});
But i am not sure it's the best way to fix the problem.
The real problem is that on automatic refresh the storage (and so claims) are overwritten with id token claims.
When only very few claims live in Indentity token and most of them are loaded through userprofile endpoint that cause a problem.
I would reload the user profile after each token refresh in that case. Otherwise, you have a mix of old and new claims. Hence, @lfongaroScp's solution looks good for me.
Most helpful comment
Hi,
I forgot to mention in the post:
This problem occur in a project that use implict-flow
I see the same problem in a project with Code flow.
I doubt it is related to #514 because the problem (bug?) is different. In my case it does not reload the claims at all, if I force the reload the claims are correct
A possible workaround is this:
But i am not sure it's the best way to fix the problem.