Answer the question
In order to leave comments, you need to log in
Authorization by phone on the site. How to do?
You need to register users by phone numbers and not by email, the site on php
numbers can be of different lengths, as country codes are of different lengths. How would you organize...
Answer the question
In order to leave comments, you need to log in
My vision of the situation.
You need to check both on the client and on the server. Client protection is foolproof.
You need to store it as the user enters, and he should only enter numbers. That is, the storage is as follows: XXXXXXXXXXX
Of course, a human-readable format like: +X(XXX)XXX-XX-XX
Well, the last and most difficult thing. The user must confirm the phone number, which means you will need an SMS gateway. And, perhaps, this is the first thing to take care of. Without number verification, there is a possibility that the user may enter a useless set of numbers, which later turns out to be someone's phone number, which is not good.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question