1.0.0 • Published 10 months ago

@oslojs/otp v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@oslojs/otp

Documentation: https://otp.oslojs.dev

A JavaScript library for generating and verifying OTPs by Oslo.

Supports HMAC-based one-time passwords (HOTP) and time-based one-time passwords (TOTP) as defined in RFC 4226 and RFC 6238.

  • Runtime-agnostic
  • No third-party dependencies
  • Fully typed
import { generateTOTP, verifyTOTP } from "@oslojs/otp";

const totp = generateTOTP(key, 30, 6);
const valid = verifyTOTP(totp, key, 30, 6);

Installation

npm i @oslojs/otp
1.0.0

10 months ago

0.2.2

10 months ago

0.2.1

12 months ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago