Claims authentication and persistent login problem - General Discussions - General Discussions - Progress Community
 General Discussions

Claims authentication and persistent login problem

  • Claims authentication and persistent login problem
  • I have a code snippet which is supposed to do programmatic login using a custom membership provider. We use claims authentication with Sitefinity 7.1.  For some reason the persistent flag seems not to work.

    var authenticationResult = SecurityManager.AuthenticateUser("Pivotal.MembershipProvider", userName, password, rememberMe);

    I did some digging inside the code and found a place which I believe is responsible for setting the cookie, There the code checks for Authentication mode and sets the cookie only if mode is Forms.

    So my question is -- how to make this functionality available in Claims authentication mode ?

    if (SecurityManager.AuthenticationMode == Telerik.Sitefinity.Security.Configuration.AuthenticationMode.Forms)<br>          SecurityManager.SetAuthenticationCookie(SystemManager.CurrentHttpContext.Response, manager.Provider.Name, user, rememberMe, issueDate);
  • Hello,

    The persistent flag will now persist the user unless the setting in Administration->Settings->Advanced->Security AuthCookiePersisten is checked. Go and update this setting to persist the auth cookie.

    Regards,
    Stanislav Velikov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  • That worked. Thank you !