I've got an Dot.Net 7 Blazor WASM app running with Duende configured for authentication.
I've also got an Orleans silo running in the server side and I wish to deactivate a grain when the user logs out.
I can wire up to the logged out event using OpenIdConnect e.g:
.AddOpenIdConnect("oidc", options =>
{
...
options.Events = new OpenIdConnectEvents
{
OnSignedOutCallbackRedirect = c => Task.FromResult(0),
OnRemoteSignOut = c => Task.FromResult(0),
OnRedirectToIdentityProviderForSignOut = c => Task.FromResult(0),
};
});
But I need to be able to inject in the IGrainFactory
whenever this event is raised to be able to speak to the grain.
Orleans aside as I don't think that's important to my issue (I could be DIing anything), how can I access an object in this event that should be injected in?