Generate OTP

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

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

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

I have done to generate OTP

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

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

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

1 Like

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

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

Thanks…will try that.

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

Cool. Thanks. Might take more info from you.

welcome :slight_smile: