You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RemoteAuthenticationService is a scoped service that implements IAccessTokenProvider.
IAccessTokenProvider is injected into a transient service AuthorizationMessageHandler (and its derivatives like BaseAddressAuthorizationMessageHandler).
AuthorizationMessageHandler instances are requested dynamically from a singleton service (DefaultHttpClientFactory). Because this is dynamic, it is not caught by static scope validation via ValidateScopes when building the service collection.
Ergo, a scoped service (RemoteAuthenticationService) is being injected into a singleton (DefaultHttpClientFactory), which is causing multiple instances of RemoteAuthenticationService to be created. In this case, a new instance is made every 2 minutes.
The text was updated successfully, but these errors were encountered:
Originally reported by @ascott18:
#40764 (comment)
The text was updated successfully, but these errors were encountered: