Answer the question
In order to leave comments, you need to log in
What are the ways to verify a user by email?
Hello. I use a regular registration script with email confirmation. That is, the user enters a login (aka email) and a password, after which a link to the verification page flies to the email specified by him with a get parameter in the form of a unique hash that is stored in the database with his login and password. On the verification page, the hash that is in the database and that came inside the get parameter are compared, etc.
Question: how can I reliably determine the email address from which the user went to confirm? Theoretically, the confirmation link may fly to the wrong place and another person will already pass the verification. How do you compare a user who just went through the registration process and a user who went through the confirmation link?
Perhaps the answer to this question is simple, but I do not have much experience in this matter, so I'm asking for advice.
Thank you.
Answer the question
In order to leave comments, you need to log in
If you are afraid that the link will accidentally end up on another email (which is very unlikely), ask, after clicking on the link, to enter the email address specified during registration and check with the value from the database.
Add your email address to the verification link. In my opinion, this is the best option.
The first thing that came to mind was to check the registration IP and the IP of the link. Well, there is a time limit, the link will work for n minutes.
And do it all together
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question