B
B
bQ12019-09-03 10:17:41
Django
bQ1, 2019-09-03 10:17:41

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

1 answer(s)
P
prrrrrrr, 2019-09-03
@bQ1

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 question

Ask a Question

731 491 924 answers to any question