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
That worked. Thank you !