Answer the question
In order to leave comments, you need to log in
Authorization via link
Good afternoon!
Some e-mail notifications come with such a link, when clicked on, the site opens and the user is authorized, even if there are no cookies. It is most likely done somehow through a hash, and an example is facebook. Tell me, what is the name of the technology?
Thank you.
Answer the question
In order to leave comments, you need to log in
it’s probably better to make a hash of some information when generating a link and save it in the database, and when you access the link, compare whether there is such a hash in the database, if so, then log in
I don’t know what the technology is called, but you can do something like this:
pass the get parameters in a path where the MD5 hash of the login and password will be. (in the address bar. For example, index.php?u=md5hash&p=morehash
On the server, process and log in the user.
The technology is called "Give information to people" :) But seriously, I just want to warn you
MoyKrug uses such links in letters, this is the part of the question about the example.
The link most likely contains a one-time password, which stops working after visiting the link. It's just that a long cookie is thrown that you are authorized.
Facebook doesn't allow it, by the way, I just checked it in an unauthorized browser.
My solution may be clumsy, but I added a cell to the user base to store the hash, and in the script itself I registered that with each successful login, the cell is reset to zero.
In the normal state, the field is empty; in the special state, the hash is deleted after a successful login.
Well, the link handler - by itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question