Visitar URL original
GitHub - chikoddish/otp-generator: Generate OTP with specific digits and seeds · GitHub
Skip to content

About

Generate OTP with specific digits and seeds

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

otp-generator

Generate OTP with specific digits and seeds

NPM

Index

Install

npm i otp-generators

Usage

var newOTP = require('otp-generators')
            // or
import newOTP from 'otp-generators';

// For numeric OTP
newOTP.generate(6, { alphabets: false, upperCase: false, specialChar: false });

// For alphanumeric OTP
newOTP.generate(6, { alphabets: true, upperCase: false, specialChar: false });

// For alphanumeric with upperCase
newOTP.generate(6, { alphabets: true, upperCase: true, specialChar: false });

// For alphanumeric with special characters 
newOTP.generate(6, { alphabets: true, upperCase: true, specialChar: true });

generate(length, options)

Arguments

  • length - length of password. Optional if options is optional. default length is 6.
  • options - optional
    • digits - Default: true true value includes digits in OTP
    • alphabets - Default: true true value includes alphabets in OTP
    • upperCase - Default: true true value includes uppercase alphabets in OTP
    • specialChar - Default: true true value includes special Characters in OTP

About

Generate OTP with specific digits and seeds

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages