41

I want to include "Remember Me" functionality on login page but I don't know its actual meaning (how its work). I have seen different uses at many websites but I didn't get its actual meaning.

4

3 Answers 3

23

Some web applications may need a "Remember Me" functionality. This means that, after a user login, user will have access from same machine to all its data even after session expired. This access will be possible until user does a logout.

From here Using Cookies to implement a RememberMe functionality

5

It means you save a cookie (or any other local storage option) with some kind of identifiable information about the user.
For more information you can search in the internet for simple implementations of user authentication platforms using PHP, ASP, JSP or any other Server-Side programming language. (Depends on what you know)

1

With ASP.NET Core this functionality sets the login cookie persistence so it is either cleared when the browser closes or it is retained. This is a very specific thing.

If a user ticks "remember me", then closes and later re-opens their browser, they will be still be logged in if the server didn't otherwise time-out the session.

You can see clearly in the sample code that the "remember me" checkbox sets a parameter in a call to PasswordSignInAsync() named "isPersistent". Documentation shows "persistence" sets the Expires value of the login cookie to "Session" if you do not tick the "remember me" box, or now plus 7 days (the default) if you tick it. I've tested this just now and it's precisely how this behaves.

Not the answer you're looking for? Browse other questions tagged or ask your own question.