S
Shabam
I'm developing an application and want to have the "remember me" feature, so
that users don't have to log back in again in the next visit.
The problem here is, what happens if the user's cookie is stolen? Or, what
prevents someone from figuring out the algorithm to the cookie session
string?
I've thought of using a random string (stored in the database) that's
written to the user's cookie once he's logged in. Since it's random there
won't be any encryption to break.
Then, whenever the user's password is updated, a replacement string is
generated and re-written to the database and also the user's cookie file.
This will invalidate any stolen cookie files.
What do you think of this? Is there a better way?
that users don't have to log back in again in the next visit.
The problem here is, what happens if the user's cookie is stolen? Or, what
prevents someone from figuring out the algorithm to the cookie session
string?
I've thought of using a random string (stored in the database) that's
written to the user's cookie once he's logged in. Since it's random there
won't be any encryption to break.
Then, whenever the user's password is updated, a replacement string is
generated and re-written to the database and also the user's cookie file.
This will invalidate any stolen cookie files.
What do you think of this? Is there a better way?