One-Time Password manager
One Time Password manager is fully compliant with HOTP (counter based one time passwords) and TOTP (time based one time passwords). It can be used in conjunction with the
Google Authenticator, for Two-Factor Authentication, which has free apps for
All methods described in both
RFC are implemented in API.
Table of contents
- Super simple to use
- Browser compatibility
- Build your project with Webpack
- API in Detail
- Change History
$ npm install --save @akanass/rx-otp rxjsor$ yarn add @akanass/rx-otp rxjs
Super simple to use
RX-OTP is designed to be the simplest way possible to generate and verify OTP.
ES6 wrotten so you can import it :
const HOTP = HOTP;
Now, it's easy to perform a generation of
HOTP.generate'12345678901234567890'.subscribeconsole.logtoken, // display 125165 in the consoleconsole.errorerr // show error in console;
RX-OTP can be used in your favorite browser to have all features in your own front application.
browser/index.js script and enjoy:
Browser version is a standalone version so you just need to
copy/paste file from
node_modules/@akanass/rx-otp/browser/index.js when you want to create your bundle and change path to it.
Build your project with Webpack
If you want to include this library inside a project builds with
webpack for a
client application, you must add this configuration inside your
target: "web"node:fs: "empty"net: "empty"tls: "empty"
target will be
node block in configuration doesn't exist and
uglify plugin must be
API in Detail
We implemented some functions and to see their details go to documentation folder:
To set up your development environment:
- clone the repo to your workspace,
- in the shell
cdto the main folder,
npm or yarn install,
npm or yarn run test.
- It will lint the code and execute all tests.
- The test coverage report can be viewed from
- v1.1.0 (2019-07-12)
- Change repository owner name
- Latest packages' versions
- Fix tests
- v1.0.0 (2019-03-08)
Copyright (c) 2019 Nicolas Jessel. Licensed under the MIT license.