Setup "Remember Me" Cookie

I’ve never setup a cookie for the Remember Me checkbox for the login form. With security issues in mind, what are your suggestions or tips of how to build this feature?

Thanks for your valued input!

1 Like

The remember me function automatically creates the cookie for you :slight_smile:

I thought that might be the case, however, I have someone telling me their login info is not being ‘remembered’ so that cause me a bit of confusion.

They are working on a Windows machine, so I’m not really sure if there is a security setting on that OS that may be causing the problem.

I have the value set to 1 in the checkbox. Usually that is sufficient.

input name=“remember” type=“checkbox” value=“1”

Any thoughts?

What do you mean their login info is not remembered?
Are they redirected when they access a protected page?

Yes indeed. I guess they think that when they logout and return, their credentials will populate the login fields.

I may have overlooked something…

Well, If the user logs out the cookie is being removed, so no login is remembered any longer.

Thanks! I will pass that info on to the user. I haven’t been on a Windows OS in many years. I know that usually there is a manual choice to ‘remember’ login on browsers. Maybe they forgot to select that initially.

But remember me checkbox does not keep the username and password in the form on the page …
That’s entirely controlled by the browser.

Remember me checkbox keep your cookie so that when you go back to a protected page it will not ask you to log in/redirect back to login page.

Thanks for the information! I appreciate it very much.

Maybe you could just change the label of the checkbox to “keep me logged in” :slight_smile:


What is the default timeout on that default cookie? If needed, can it be adjusted?

just a quick question. When flagged the checkbox, value must be 1 to be remembered… it is right ?

That is correct. The checkbox is set to: value=“1”