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
Post a Comment