PHP stores password in cookie

Is there a relatively safe way to store a password in a browser cookie (to remember login information) in a cookie without creating an additional hash column in the database? Thank.

+3
source share
4 answers

Store salted password hash in cookie

$salt = 'snfcikkfbnvekrew';
$cookie_value = md5($salt . $password);
+5
source

You should never store unencrypted or even decryptable passwords in your database, unless you have created them and the user cannot enter their own

cookie, . , , - . , , , .

" " cookie. - , " ".

+9

cookie - . , cookie, , cookie , - cookie, , .

cookie, HTTPS , , , , .

, , - . , . , - , , , , , ( IP-, ..).

+2

The short answer is: never store passwords in cookies or if they are not specified anywhere. Not. In your scenario, JSON web tokens (JWT) can be used to store client-side authorization.

0
source

All Articles