I am using ASPNet Identity 2.0 (Full framework, not the core framework) and MVC. I would like to execute C# code once the user successfully login to the site.
i know that i can write some code right after the SignInManager.PasswordSignInAsync
command
and it will work for new login but not will not work for users who used "remember me" feature and returned to the site later (Cookie authentication).
I am looking for an option to catch the event of all the users who signed in to the site either by entering the password and by using the "remember me" cookie.
I understand that maybe the authentication will be on every page and i am ok with this. Could you please advice, where should i put my code? Should it be on the [Authorize] attribute? or there is a specific AspNetIdentity delegate or event i can use for that?