🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

yubico-js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yubico-js

A Yubico OTP Client

latest
Source
npmnpm
Version
0.0.13
Version published
Maintainers
1
Created
Source

Yubico-JS

npm node-current

An implementation of the Yubico Validation Protocol.

Features

  • Verify Yubikey OTPs

Setup guide

  • Clone the repository.

    npm install
    
  • Get client ID and secret from Yubico.

  • Create .env file with the following content:

    CLIENT_ID="CLIENT_ID"
    SECRET_KEY="SECRET_KEY"
    OTP="any_otp"
    
    
  • 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

Keywords

Yubico

FAQs

Package last updated on 26 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts