0.1.6 • Published 2 years ago

one-time-password v0.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

One-Time Password

A simple library for deriving one-time passwords from a base32 key.

Getting Started

These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.

Installing

Requirements:

  • Node.js
  • NPM (Node.js package manager)

Install with:

npm install one-time-password

How To Use

import * as OTP from 'one-time-password';

// A base32-encoded key.
const dummyKey: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';

// Derive a 6-digit, time-based token from 'dummyKey'.
const token: string = OTP.generate(dummyKey);

// If token is valid.
console.log(OTP.verify(dummyKey, token));

Built With

Versioning

We use Semantic Versioning for versioning.

Authors

  • Billie Thompson - Provided README Template - PurpleBooth
  • Shane Davenport - Library Author - Github

License

This project is licensed under the MIT License Creative Commons License - see the LICENSE.md file for details.

0.1.6

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago