Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DotNetNuke: Why doesn't "Remember me" work like I expect?

Running the latest version of DotNetNuke, version 5.6.1 and cannot find a good answer to why Username and Password cannot be remembered on a DotNetNuke site. This thread goes on about cookies but really misses the point. User 'ptleitch' puts it best when he askes:

"Well thats all fine and dandy. You learn something new everyday. The problem is, my users are submitting issues along the lines of they expect the "remember login" feature to auto-populate the "username" field in the login control, and I've got nothing to tell them other than they're out of luck."

like image 807
supervan Avatar asked Feb 27 '11 14:02

supervan


People also ask

How does the Remember Me function work?

Clicking the “Remember Me” box tells the browser to save a cookie so that if you close out the window for the site without signing out, the next time you go back, you will be signed back in automatically. Make sure that you have your browser set to remember cookies, or this function will not work.

What is Remember Me option?

Use the “remember me” option to reduce how often you have to sign in with two-factor authentication (2FA) on the same web browser. It's safe to use on trusted computers, and lasts for 30 days.


2 Answers

First, to enable the functionality, as orka said, you'll want to set the PersistentCookieTimeout in the web.config to something greater than 0 (value is in minutes).

In addition to that though, I'd suggest altering the verbiage presented to the user on the login screen to be more accurate. "Remember Login" does make it seem like it's just going to auto-populate your credentials - which, functionality-wise, doesn't really make sense.

So, I'd recommend changing "Remember Login" to "Stay signed in."

You access (and update) the verbiage through the DNN user interface by browsing to Admin -> Languages -> (edit English static resources for site link) -> Local Resources -> DesktopModules -> Admin -> Authentication -> App_LocalResources -> Login.ascx.

On a little bit of a tangent - I'd go as far as to suggest that you should change everything from "Login" to "Sign in" as well (e.g. User Sign In, Stay signed in, etc) - just because it makes more sense.

like image 144
Ian Robinson Avatar answered Oct 29 '22 09:10

Ian Robinson


The short answer of long story is using PersistentCookieTimeout parameter at the appSettings section of web.config file. The parameter value is in minutes and should be set bigger than 0 (20160 for two weeks) to work RememberMe functionality properly.

like image 34
orka Avatar answered Oct 29 '22 09:10

orka