Closed rpetigny closed 2 years ago
Hi @rpetigny , i do not understand your problem. Do you have sample of code?
After a complete discussion this problem is due to a bad using of a useState.
But they are the same problem of many ones. The withAuthentication force rerender when oidc user change (after a refresh). I'm on It from many times but I had to work more on It
This is fixed in v4. https://www.npmjs.com/package/@axa-fr/react-oidc-context Hooks have been splitted in order to solve that problem.
Issue and Steps to Reproduce
Access token is correctly refreshed when expired. But if we have a context which expose an overrided version of fetch, the user inside is never update.
Versions
All
Expected
Fetch should get access_token from UserManager, not from its props
Actual
Fetch gets access_token from props, which are provided by a contextProvider