C
C#3y ago
Bread

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
FroH.LVT
FroH.LVT3y ago
You can custom Log in Action => you can raise any event you want
Bread
BreadOP3y ago
I won't have control over the controller
FroH.LVT
FroH.LVT3y ago
create your own login page and use SignInManager would be good enough
Sossenbinder
Sossenbinder3y ago
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
Want results from more Discord servers?
Add your server