yubikey-async
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

yubikey-async

A Promise-based client library for verifying Yubikey OTPs with Yubikey's API servers.

Based on the original work of node-yubikey.

Usage

import { Yubikey } from 'yubikey-async';

const otp = ...;

const auth = new Yubikey(process.env.YUBIKEY_CLIENT_ID, process.env.YUBIKEY_CLIENT_SECRET);

const isValid = await auth.verify(otp);

...

Testing

Please use the test.ts file with ts-node and a valid Yubikey device.

npm test -- --otp <otp>

License

See: License;

/yubikey-async/

    Package Sidebar

    Install

    npm i yubikey-async

    Weekly Downloads

    4

    Version

    0.2.1

    License

    ISC

    Unpacked Size

    54.6 kB

    Total Files

    8

    Last publish

    Collaborators

    • illuser