Closed appetere closed 8 years ago
Yea, I could see that as useful. Perhaps load by default with another flag to make it lazy load.
Closing, as this has been addressed in the updated oidc-client (https://github.com/IdentityModel/oidc-client-js) replacement.
The
renewTokenSilentAsync
method takes a copy of the TokenManagersettings
then creates a newOidcClient
using these.Then it calls into
loadMetadataAsync
, makes a call to the metadata-endpoint and sets the result onsettings.metadata
.But the next time
renewTokenSilentAsync
is run, the original settings are used without the metadata, and another call to the metadata-endpoint it required.So I was wondering if this method could use the existing instance of OidcClient on TokenManager, to get the metadata once per instance of TokenManager?
My workaround is to make a call to
loadMetadataAsync
at application startup, so the TokenManager'ssettings.metadata
property is set, which subsequent calls torenewTokenSilentAsync
will then use.For reference: