otp-builder
v1.0.3
Published
A simple and secure One-Time Password (OTP) generator and verifier for Node.js applications.
Downloads
14
Maintainers
Readme
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
npm install otp-builder
| 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 "[email protected]". |
| 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. |