Possible to 'intercept' a successful sign in attempt with .net core identity?
I was curious if it was possible to add some middleware that would detect if someone has signed in successfully with Identity, I'd like to raise my own events and handle them as I need
4 Replies
You can custom Log in Action => you can raise any event you want
I won't have control over the controller
create your own login page and use SignInManager would be good enough
If you're referring to HttpContext.SigninAsync, then I think it ultimately at some point requests a IAuthenticationService through DI, which has the SignInAsync method
Maybe you can create a decorator for IAuthenticationService and register it
With the decorator raising an event