0.0.13 • Published 3 years ago

yubico-js v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Yubico-JS

npm node-current

An implementation of the Yubico Validation Protocol.

Features

  • Verify Yubikey OTPs

Setup guide

  1. Clone the repository.
    npm install
  2. Get client ID and secret from Yubico.
  3. Create .env file with the following content:

    CLIENT_ID="CLIENT_ID"
    SECRET_KEY="SECRET_KEY"
    OTP="any_otp"
  4. Run the tests.

    npm test

Usage

import { Yubico } from 'yubico-js';

const yubico = new Yubico({
  clientId: 'YOUR_CLIENT_ID',
  secretKey: 'YOUR_SECRET_KEY',
});

// To verify otp
try {
  yubico.verifyOtp(otpString);
} catch (e) {
  console.log(e);
}

Contributing

PRs Welcome Bugs

0.0.13

3 years ago

0.0.12

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.1

3 years ago