Repository navigation
v1.0.0 — Clockwork
A TOTP authenticator that runs entirely in your browser. RFC 4226 and RFC 6238
are implemented from scratch — no OTP library, no network requests at runtime,
and nothing stored unless you switch the vault on.
Try it: clockwork-sage.vercel.app
Downloads
| File | What it is |
|---|---|
clockwork.html |
One self-contained file, all 37 languages, ~592 kB. Save it anywhere, double-click, done. |
clockwork-de-en.html |
The same app with German and English only, ~302 kB. |
Both are plain static files: no server, no connection, no installation. Open
either with your browser's network tab recording and you will see exactly one
request — the document itself.
How it got here
v1 — the algorithm. Base32 (RFC 4648), HOTP (RFC 4226), TOTP (RFC 6238) and
an otpauth:// parser, all hand-written against the published test vectors. The
only borrowed crypto primitive is crypto.subtle. Stateless by design.
v2 — the instrument. A complete redesign around one idea: this is a
measuring device for time, in the spirit of Dieter Rams. No cards, no gradients,
exactly one accent colour. The countdown became a 30-mark dial with a rotating
hand instead of the usual progress ring. Plus four features: QR import from
camera, file, drag or clipboard; an opt-in vault (PBKDF2-SHA-256 with 600,000
iterations, then AES-256-GCM); PWA installability; and Google Authenticator
export import via a hand-written protobuf reader.
v3 — 37 languages. A self-written i18n layer, no library: keys checked by
the TypeScript compiler, plurals via Intl.PluralRules, right-to-left layouts
for Arabic and Hebrew. Everything bundled — loading a language on demand would
be a network request, and the single-file build forbids those. The dial never
mirrors, and codes stay Latin and left-to-right, because they get typed into
other people's login fields.
v4 — published. MIT licence, a security policy, contribution guidelines, CI
on every push, real HTTP security headers on the hosted version, and a
build-time language selection (CLOCKWORK_LANGS=de,en npm run build) for anyone
who does not want all 37.
Verifying it
npm ci && npm test # 500 tests, including every RFC test vector
npm run build
node scripts/check-bundle.mjsThe last command measures the promise instead of repeating it: it counts every
network API in the finished bundle and expects zero.
Before you rely on this
Set up backup codes with each provider. They are the only thing that gets
you back in when a secret is lost, and no authenticator app can replace them.
TOTP also does not protect against real-time phishing — a fake login page can
ask for your password and your code and replay both within seconds. Only
passkeys or a FIDO2 key check the domain. See
SECURITY.md.