1.9.6 • Published 6 months ago

otp-gen-next v1.9.6

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

OTP Generator

test workflow

Generate secure one-time passwords (OTP) for your applications with ease using this OTP generator package. Whether you need numeric, alphabetic, or special character OTPs, this package has you everything you need. and offers various customization options to generate flexible one-time passwords.

Installation

Install the package via npm:

npm install otp-gen-next

Features

Generate numeric, alphabetic, or alphanumeric OTPs Include uppercase alphabetic characters and special characters if needed Exclude similar characters like '1' and 'l', '0' and 'O' for enhanced security Exclude ambiguous characters like '{}' or '[]' that can be confused Add custom characters to the OTP generation process Flexible and easy-to-use API

Playground

Go to Playground otp-gen-next

Usage

commonJS

const { generateOTP } = require('otp-gen-next')
generateOTP(); //generates a otp with default options with the length of 4
generateOTP(6, { upperCaseAlphabets: false, specialChars: false });

TypeScript

import { generateOTP } from 'otp-gen-next';

// Generate a 6-character OTP with custom options
const otp = generateOTP(6, { 
    numeric: true, 
    alphabetic: true, 
    upperCaseAlphabets: true, 
    specialChars: false, 
    excludeSimilarCharacters: true,
    excludeAmbiguousCharacters: true,
    customChars: ''
});

console.log('Generated OTP:', otp);
1.9.6

6 months ago

1.9.5

6 months ago

1.9.4

8 months ago

1.9.1

9 months ago

1.9.0

9 months ago

1.9.3

9 months ago

1.9.2

9 months ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago