IdentityModel / oidc-client-js

OpenID Connect (OIDC) and OAuth2 protocol support for browser-based JavaScript applications
Apache License 2.0
2.43k stars 840 forks source link

Usermanager getuser token in axios #1268

Closed Redzino closed 3 years ago

Redzino commented 3 years ago

Hi. I m thinking about how to add access token to api call header. It is good idea to call getuser() promise in every api call with axios? It is better store token in local storage? What is different ?

brockallen commented 3 years ago

Yes, call getUser() as that will always load the most current access token.