otpauth
One Time Password (HOTP/TOTP) library for Node.js, Deno, Bun and browsers
@epic-web/totp
Create and verify cryptographically secure Time-based One-time Passwords (TOTP) using the HMAC-based One-time Password (HOTP) algorithm.
2factor-auth
TOTP + HOTP library, aimed for communication between servers handing 2FA
speakeasy
Two-factor authentication for Node.js. One-time passcode generator (HOTP/TOTP) with support for Google Authenticator.