php - How do authentication cookies work? -


i don't understand how authentication cookies work, trying find way implement remember me system in php. sites have looked @ suggest not fool proof system , understand that. anyway suggests creating token random_bytes, storing hashed version of token user id in database, storing token in cookie , comparing on login @ least that's how understand it.

what's stopping finding cookie on computer , copying value logging in websites? sure missing unless contents of cookie encrypted decrypted use slow method less cracked or sha256 can cracked.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -