{"adoption": {"forks": 146, "observed_at": "2026-08-28T04:06:34.840949+00:00", "stars": 2289}, "canonical_url": "https://ross.abutalabs.com/products/otplib", "card": {"archived": false, "artifact_type": "library", "description": "One Time Password (OTP) / 2FA for Node.js and Browser - Supports HOTP, TOTP and Google Authenticator", "domain": ["security", "web-development", "developer-tools", "backend", "frontend"], "enriched": true, "function": ["auth", "cryptography", "security", "sdk"], "health_score": 99, "homepage": "https://otplib.yeojz.dev", "language": "TypeScript", "license": "MIT", "license_family": "permissive", "maturity": "active", "member_repos": ["yeojz/otplib"], "name": "yeojz/otplib", "platform": ["browser", "bun", "cross-platform"], "pushed_at": "2026-08-23T16:30:18+00:00", "repo": "yeojz/otplib", "stars": 2289, "tags": ["otp", "totp", "hotp", "two-factor-authentication", "2fa", "mfa", "google-authenticator", "authenticator-apps", "rfc-4226", "rfc-6238", "base32", "hmac", "qr-code-uri", "plugin-architecture", "web-crypto", "nodejs", "deno", "typescript"], "topics": ["hotp", "hmac", "otp", "authenticator", "2fa", "one-time-passwords", "two-factor-authentication", "two-factor", "google-authenticator", "nodejs", "browser", "cli"], "urls": [], "use_cases": ["add TOTP two-factor authentication to a Node.js web app", "generate and verify HOTP tokens for hardware tokens", "generate otpauth:// URIs and QR codes for authenticator apps", "implement 2FA login compatible with Google Authenticator and Authy", "generate one-time passwords in the browser or edge runtime", "verify TOTP tokens server-side with counter resync windows", "build a custom OTP flow with pluggable crypto providers"], "what_it_is": "otplib is a TypeScript-first library for generating and verifying one-time passwords (HOTP and TOTP) for two-factor authentication, compatible with Google Authenticator and similar apps. It supports multiple runtimes (Node.js, Bun, Deno, browsers) through a pluggable architecture for crypto and Base32 implementations.", "when_to_avoid": ["you need SMS or email-based OTP delivery rather than authenticator-app tokens", "you need a full identity/auth solution with sessions, users, and password management rather than just OTP primitives", "you are on a non-JavaScript stack (Python, Go, etc.)", "you depend on otplib v12's separate authenticator package or legacy crypto adapters, since v13 is a breaking rewrite"], "when_to_choose": ["you need RFC-compliant HOTP/TOTP generation and verification in JavaScript or TypeScript", "you need one library that works across Node.js, Bun, Deno, and browsers", "you want audited cryptographic defaults (@noble/hashes, @scure/base) with a plugin system to swap implementations", "you need Google Authenticator-compatible otpauth URIs and QR code setup flows", "you want a TypeScript-first API with full type definitions and async-first design"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/otplib", "repo": "yeojz/otplib", "role": "main", "score": 99}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:06:34.840949+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T02:40:49.917414+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5c2178c3181c6ebda58f3f8458f2a852995030fce36b2e118508633ae730ec92", "fetched_at": "2026-08-28T04:06:34.840949+00:00", "kind": "readme", "missing": false, "url": "https://github.com/yeojz/otplib"}, {"content_hash": "a01487850b0c4956a1d2b295848e7f7e3352d202d7193d46a2fc79806abd083b", "fetched_at": "2026-08-29T10:21:22.720137+00:00", "kind": "homepage", "missing": false, "url": "https://otplib.yeojz.dev"}, {"content_hash": "e7199165cffde68b759f58effc8e014ac5170b832e8e286e1f3cfa3a78cc3552", "fetched_at": "2026-08-29T10:21:22.729644+00:00", "kind": "site_page", "missing": false, "url": "https://otplib.yeojz.dev/guide/getting-started.html"}, {"content_hash": "35098f30a74b36772fe8fed77a708afe09e8119e9aa550f00ccdc63af764d0d8", "fetched_at": "2026-08-29T10:21:22.731968+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/otplib"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 99, "longevity": 100, "rhythm": 98}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 4525, "days_push": 10, "days_rel": 12, "gap_med": 10, "n_releases_24m": 10}, "score": 99, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}