Has anyone else injected the IDispatcher in to the a class inheriting from RevalidatingServerAuthenticationStateProvider
I would like to do this, so that i can dispatch a message as i use this to intercept when my access tokens may expire and then refresh them.
If i inject the IDispatcher in the blazor jsut fails to load and i get no errors jsut a white screen, uncommenting that from the constructor makes the app work again.
I am injecting other things via DI in to this class without issue?
Has anyone else injected the IDispatcher in to the a class inheriting from RevalidatingServerAuthenticationStateProvider
I would like to do this, so that i can dispatch a message as i use this to intercept when my access tokens may expire and then refresh them.
If i inject the IDispatcher in the blazor jsut fails to load and i get no errors jsut a white screen, uncommenting that from the constructor makes the app work again. I am injecting other things via DI in to this class without issue?
` public class AuthStateProvider : RevalidatingServerAuthenticationStateProvider { private readonly IHttpClientFactory _httpClientFactory; private readonly IDiscoveryCache _oidcDiscoveryCache; private readonly IConfiguration _configuration; private readonly IState _appState;
//private readonly IDispatcher _dispatcher;
private readonly ILogger _logger;
Any thoughts?