node.jsmernone-time-password

Otp Verification in nodejs?


I want to send otp via SMS and email to the user who is signing-up to the web app to verify their email and phone no. Is there any NPM package for sending and verifying OTP or should I write my own code?


Solution

  • Yes, there is a package called sendotp. This is used for sending OTP over SMS only.

    In npmjs you can find different examples to achieve your task.

    But my suggestion is to implement your own methodology for sending and verifying OTP is better. Because by using packages you might get extra methods that you don't want at all or there is no functionality implemented that you want.