Answer the question
In order to leave comments, you need to log in
How to make a hash universal?
When authorizing a user, I write a hash (email + password) in cookies, i.e. in fact, it is always the same, but I want it to be unique every time. I tried adding the last 3 digits from time() , but in this case, if a person logs in from one browser and then from another, the cookies will be different and, accordingly, in the first case, the user will not be authorized, because the cookies are in the database and browser is different .
How to make "cookies" universal, so that the hash is different every time, and authorization works even if you need to log in from several devices at the same time.
Answer the question
In order to leave comments, you need to log in
Store issued authorization keys in a separate issued key table, not in the user table.
php.net/manual/ru/function.password-hash.php
php.net/manual/ru/function.password-verify.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question