I’m using Forms Authentication (and the built in Login controls) and letting users click the ‘remember me’ checkbox when logging in. When they return to the site, they are automatically logged in as expected. Is there an event I can catch when this happens? I’ve been studying the FormsAuthenticationModule.Authenticate event, but I’m not sure that is the correct approach.
I’m using Forms Authentication (and the built in Login controls) and letting users click
Share
Look in the Application_AuthenticateRequest event in Global.asax.
http://msdn.microsoft.com/en-us/library/system.web.httpapplication.aspx
This event fires after the user has been authenticated (via having manually signed in or with a cookie). From there, you can do what you need. You can interrogate the Page.User object for info about the logged in user,
http://msdn.microsoft.com/en-us/library/system.web.ui.page.user.aspx