oidc-client
oidc-client copied to clipboard
OidcUser is not cached in useOidcUser
Issue and Steps to Reproduce
The useOidcUser
hook calls the userInfoEndpoint
on every page load (oidcUser is never put in Storage/cached).
Versions
6.10.9
Screenshots
Expected
oidcUser should be stored in the specified Storage and if set userInfoAsync or the fetch inside it should not be called again.
Actual
User info is only stored in state and there is no conditional around the userInfoAsync call to not fetch user info if it already has been.
Additional Details
- Installed packages:
Hi @tobnobs , thank you for your issue. Yes, your are completly right !
Hello i have the same issue OidcUser is not stored or cached somewhere
Is there a sense of how difficult this would be to implement? I'm working on a project that would benefit from the improvement and we might be able to spend a cycle or two on making this improvement.