Claims authentication and persistent login problem

Posted by Community Admin on 03-Aug-2018 13:10

Claims authentication and persistent login problem

All Replies

Posted by Community Admin on 10-Jun-2015 00:00

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);

Posted by Community Admin on 15-Jun-2015 00:00

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
 

Posted by Community Admin on 18-Jun-2015 00:00

That worked. Thank you !

This thread is closed