react-oidc-context icon indicating copy to clipboard operation
react-oidc-context copied to clipboard

Better documentation for using this library in an imperative way

Open danielr1996 opened this issue 3 years ago • 1 comments

The documentation states that for using this library in an imperative way (e.g. for using with redux) one should configure the oidc-client-ts library with the WebStorageStateStore option and that the needed information then can be found in localStorage.getItem(oidc.user::)

However I observed that I didn't need to use the WebStorageStateStore config and had to retrieve the information from session storage rather than local storage. I don't know if that holds true in any case or just in my case so I'm not confident enough to submit a PR for the documentation, but perhaps someone with a deeper understanding of how this works can expand the documentation to be more clear on how to do this.

danielr1996 avatar Sep 11 '22 17:09 danielr1996

You are right that can be improved. At the end it does not depend on redux, but on how you have configured the underlying oidc-client-ts library (settings.userStore).

Fell free to make a MR to improve that doc section...

pamapa avatar Sep 12 '22 11:09 pamapa