yubikeycr

0.0.3 • Public • Published

Node.js addon for generating OTPs with YubiKey

Pre-requisites

Install needed dependencies

$ git clone git://github.com/Yubico/yubico-c.git
$ cd yubico-c
$ autoreconf --install
$ ./configure
$ make check
$ sudo make install
$ cd ..
$ git clone git://github.com/Yubico/yubikey-personalization.git
$ cd yubikey-personalization
$ autoreconf --install
$ ./configure
$ make check
$ sudo make install

Configuring YubiKey

Configure your YubiKey in HMAC challenge-response mode:

$ slot=1
$ ykpersonalize -$slot -ochal-resp -ochal-hmac 

Note, YubiKey has two slots, so one can configure both slots in this mode if supporting 2 identities is required.

Building the module

Compile the code:

$ make all

Run an example:

$ node example.js

Installing from npm repository

$ npm install yubikeycr

Test installation:

var m = require('yubikeycr')
var slot = 1
var ts = new Date().getTime();
var otp = m.genOtp(ts, slot)
console.log('OTP for timestamp ' + ts + ' is ' + otp);

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.34latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.34
0.0.20
0.0.10

Package Sidebar

Install

npm i yubikeycr

Weekly Downloads

4

Version

0.0.3

License

none

Last publish

Collaborators

  • dmitriy.kuptsov