|
|
|
|
|
by madjar
4965 days ago
|
|
The first answer mentions a couple of time that any token given to the user (for remember-me login or password reset) should be hashed in the database. Would it be possible to replace the whole storing by signing the token with some private key, so that the validity of the token can be checked without having to compare it to some stored value ? |
|
Whereas if only token hashes are stored in the database, then the entire database could be stolen and nobody can use it to generate valid cookies.
EDIT: Also, if an account goes rogue you have no way to invalidate its cookies, so you'll have to do a lookup for each request to see if the account is blocked.