I was reading this article and I was wondering, what exactly is a standard session management cookie (SSMC)?
It also recommends that the SSMC should be a session cookie and therefore expire when the browser is closed.
Because it's an 'improved' article, I tried to look for any definition in the original article (here). According to it, a "SSMC handles the credentials for the life of the session, so the newly assigned cookie will not be checked until the next session (at which point it, too, will be invalidated after use)."
What I didn't understand is how long will the user be logged in if the session expires when the browser closes and the session's lifetime credentials are deleted? and how this should be used? There is nothing in the article about the 'normal' cookies (that contain the login information) being session cookies and therefore they should have an expiration date.
I'm really confused so I hope someone can clear it up for me. Any alternatives as secure as this one are also welcomed. Thanks!
Background:
I'm writing a remember me function using cookies. Apparently there are 2 cookies; The first one is the SSMC (standard session management cookie) and the second one is a login cookie which consists of:
- A username
- A
unique tokenthat's being regenerated every time the user logs in to the site - A
series idwhich is a unique random number for a specificusernamethat never changes. These are also stored in a table in the database.