Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Node.js client for verifying YubiKey OTPs
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
index.js
package.json
test.js

README.md

A Node.js client library for verifying OTPs with the Yubikey api servers.

Install

npm install yubikey

Or fork this repo and help improve it.

Usage:

var Yubikey = require('yubikey');

var yubikey = new Yubkey(client_id, secret_key);
// client_id and secret_key can also be discovered from env

function onVerify(err) {
  // if err is null, you're good
}

yubikey.verify('vvvvvvcurikvhjcvnlnbecbkubjvuittbifhndhn', onVerify);

Testing

Plug your YubiKey in, and run ./test.js. Try entering the same token twice.

Resources

Something went wrong with that request. Please try again.