OTP authentication in Nativescript


#1

Hi,
I am a beginner in development.
How can I authenticate the user with OTP in nativescript .? is there any plugin I have to use ??


#2

OTP is a pretty wide field - can you be more specific?


#3

Okay,
While a user registering in my app I want the user to enter his mobile number to which I will send an OTP(one time password) then I will ask him to enter the OTP he received so that I can validate his mobile number.


#4

Sounds a lot like the “phone verification” feature I recently added to the Firebase plugin:


#5

You might also consider time-based one time passwords for two-factor authentication.

To accept two-factor codes via a web server you might do something like this:

To build your own time-based one time password generator with NativeScript, you might do something like this:

Best,


#6

Recently I succeeded in implementing otp in my app using third party otp service api. Set up a node server and have your app call the node server which will call the otp service api. Read responses and act accordingly. The app was written in ionic 3 though. The process would be same, i suppose