Generate OTP


#1

How to generate OTP for every user…each user has fix OTP means exisiting user has fix OTP


#2

Sorry, could you rephrase what you are trying to do?


#3

You can implement otp logic as follows

  1. Can generate random numbers(4,5 digit) and send to the mobile number(email address)
    2)Save the mobile number and this otp on the database
  2. if user submitting the otp just cross check the mobile number and the otp with database content
    4)If two things are matching Delete the entries from the table
    5)to handle resend otp logic just update the otp value in the database corresponds to the mobile number and send to User

#5

I have done to generate OTP


#6

How did you manage to authenticate the user using OTP. Can you please share the details?


#7

i am using custom back-end api for doing the OTP auth


#8

I manage OTP using Database…when user first time registered that time I’m sending OTP
Then All time user verified same OTP…as unique password


#9

and how are you sending SMS with OTP? Are you using SMS gateway, if yes, then how did you integrate it with Ionic.


#10

set SMS API with OTP in project API and integrate project API in ionic


#11

Thanks…will try that.


#12

wc…but in our app OTP is using as unique password


#13

Cool. Thanks. Might take more info from you.


#14

welcome :slight_smile: