How speakeasyjs/speakeasy works
Speakeasy is a small Node.js library for generating and verifying HOTP/TOTP one-time passcodes, plus generating secrets and authenticator-compatible otpauth URLs. The typical workflow is secret generation, URL creation for authenticator setup, then token generation or verification. The sampled source is incomplete, so internal links not established by the excerpts are omitted; QR rendering and secret persistence belong to the integrating application.
Main entry points: index.js Speakeasy exports
Components 12
Library API
- Speakeasy exports
index.js
Passcode Operations
- HOTP generation
index.js - HOTP verification
index.js - TOTP generation
index.js - TOTP verification
index.js
Authenticator Setup
- Secret generation
index.js - ASCII key generation
index.js - otpauth URL
index.js
Other components
- Integrating application
- base32.js
- Node crypto
- Authenticator app
Connections 13
- Integrating application → Speakeasy exports: calls
- Speakeasy exports → Secret generation: exposes
- Speakeasy exports → HOTP generation: exposes
- Speakeasy exports → HOTP verification: exposes
- Speakeasy exports → TOTP generation: exposes
- Speakeasy exports → TOTP verification: exposes
- Speakeasy exports → otpauth URL: exposes
- Secret generation → ASCII key generation: calls
- Secret generation → base32.js: encodes
- otpauth URL → Authenticator app: provides setup URL
- Integrating application → Authenticator app: displays QR
- Speakeasy exports → base32.js: imports
- Speakeasy exports → Node crypto: imports