Page 1 of 1

User confirmation with SMS

Posted: Mon Apr 20, 2015 1:00 pm
by Hank Joreid

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?


User confirmation with SMS

Posted: Mon Apr 20, 2015 7:40 pm
by Serhii Kulibaba

Hello,

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


User confirmation with SMS

Posted: Mon Apr 20, 2015 8:09 pm
by Hank Joreid

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.


User confirmation with SMS

Posted: Wed Apr 22, 2015 3:02 am
by Yurii Orishchuk

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