I wanted to verify phone numbers before using them for communication with registred users. However, I am unclear If I'm doing it securely. i.e
Steps I'm taking:
- Ask user for phone number
- Send SMS verification code
- User enters Code
- Code verified using SMS Service(Sinch or/Twilio)
- correct code triggers callback function(client side) that adds the number to backend Database
- Incorrect code does nothing
My concern is step 5. Should I have the success callback function perform the number save on client side or should I trigger some backend(server-side) function that performs the save operation?