OTP BUILDER
A versatile npm module for OTP (One-Time Password) generation verification and management.
Features
Here're some of the project's best features:
- OTP generation
- OTP verification
- OTP storage with custom identifiers
- Configurable expiry time
- Secure OTP generation using secret keys
️ Installation Steps:
1. install using npm
npm install otp-builder
Genrate Otp
Verify Otp
Property | Description |
---|
digits | The number of digits in the generated OTP. (default = 4) |
expirySeconds | The time in seconds after which the OTP will expire. Here, it's set to 35 seconds, so the OTP will be valid for 35 seconds from the time of generation. (default = 30 ) |
identifier | A unique identifier associated with the OTP. This could be an email address, phone number, or any other unique identifier for the user or session. In this example, it's set to "example@gmail.com". |
secret | A secret key used to enhance the security of the OTP generation process. It's a string of random characters that adds an extra layer of randomness and security to the OTP. |