Answer the question
In order to leave comments, you need to log in
How to implement SMS authorization correctly?
I imagine it like this:
1) The code is generated on the server and written, for example, to a table in the database;
2) Then this code is sent via the api of some service to the mobile phone;
3) The user enters the code and it is checked for compliance with what was previously written in the database;
Is this correct or is there a better way to do this?
Answer the question
In order to leave comments, you need to log in
I made it simpler, without writing to the table:
a code is generated, we redirect the user to a page with a get of this code and a phone number, but only encrypt this data in the url. the code is checked there, in the opposite way: the get is pulled out, decrypted, and compared with what the user entered. bodies are encrypted from substitution
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question