Need to refresh to pick up authentication after login?

Vote:
 
Hi, I'm working on some custom authentication, and using the stuff in http://www.episerver.com/templates/faq____977.aspx (except it's in vb.net) It works okay after you login AND do a refresh, but you don't appear to be logged in after the first login. The problem seems to be the authentication hookup fires AFTER the page_load (the login code is in a framework, so the page is refreshed rather than redirected away from) - so ou are authenticated, but only after the page load. This is not good, as we want the page to self-detect the authentication status and build itself to suit this status. Anyone found this too, and have a solution to it? Or has anyone found that this doesn't happen for them? cheers
#12508
Mar 25, 2008 18:35
Vote:
 
Hi, if you've created your own authentication module, the authentication will happen very early in the page life cycle (check the documentation for FormsAuthentication_OnAuthenticate on MSDN). Are you creating your own login form? (which normally does not have anything to do with custom authentication handlers). If that is the case, you're correct, authentication would normally occur in the click event of a button, which runs late in the page life cycle. The usual solution is to redirect to the same page, if the login was successful. See this thread for more information: http://www.episerver.com/devforum/ShowTopic____3429.aspx /Steve
#14386
Mar 25, 2008 18:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.