Hank Joreid
Posts: 0
Joined: Mon Apr 20, 2015 1:00 pm

User confirmation with SMS

Hi, i have used the defualt user register system to a new app.
when a user register i need the user to confirm the phone number the user register with. i have a API to a SMS gateway to send out a confirm password but now to do this in the app?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

User confirmation with SMS

Hello,

Please follow topic below: https://blog.appery.io/2014/03/dialin...

Hank Joreid
Posts: 0
Joined: Mon Apr 20, 2015 1:00 pm

User confirmation with SMS

Hi Sergiy, Sending the SMS is not the problem, but make the user do that the user cannot use the app before he have confirm the account. (eks set activete=1 in DB) for using the app.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

User confirmation with SMS

Hi Hawk,

It's up to you how to implement this logic.

Common way is:

  1. Add "NotConfirmedUsers" collection to your app.

  2. Generate random number.

  3. Save all fields(user entered) and random number to this collection.

  4. Send sms with stored random number to user.

  5. User enter this random number and submits form again.

  6. Server logic(server code) get stored random number from DB and compare it with entered by user number.

  7. If numbers are equal - you register new user(in system Users collection).

  8. If numbers are not equal - you show user some alert about wrong number.

    Regards

Return to “Issues”