Javlon Baxtiyorov
Plate II  ·  Open library  ·  alpha · v0.1
II

Passwordless Trust

Phishing-resistant login, without owning your auth.

Fig. 2 — Verification Mechanism: cutaway of a lock showing tumblers, ratchet wheel with pawl for monotonic counter clone detection CHALLENGE SIGNATURE TUMBLER PINS SHEAR LINE ORIGIN CHECK RATCHET WHEEL MONOTONIC COUNTER · CLONE DETECT PAWL ONE DIRECTION ONLY fig. 2 — verification mechanism
fig. — passwordless trust

Abstract

Passkeys / WebAuthn for FastAPI. It performs the cryptographically sensitive ceremony — challenge issuance, signature verification, clone detection — and hands control back to you. Secure by default; out of your way by design.

1stars
Pythonlanguage
alpha · v0.1status

The Problem

WebAuthn is the strongest mainstream authentication we have and the easiest to implement subtly wrong. Skip an origin check, reuse a challenge, ignore the signature counter, and you have built a lock that looks closed and isn't. Secure-by-default means the unsafe path should be the one you have to go out of your way to take.

The System

The library owns exactly one thing: ceremony verification. Single-use, TTL-bound challenges. Strict origin and relying-party validation. A monotonic signature counter that detects cloned authenticators. Credential and challenge storage sit behind async protocols, with in-memory, stateless, SQLAlchemy, and Redis adapters supplied. The clone-detection ratchet only turns one direction — like the counter it models. I drew it that way because that's what it is.

The Decisions

It is auth-agnostic and ORM-agnostic on purpose. It verifies the passkey and returns the user — your session, your JWT, your database, your call, exposed through explicit hooks. Owning only the hard security problem is the whole point: a library should be small where it is dangerous and silent everywhere else. Alpha, and I say so. An archive records the date and the revision; it doesn't pretend the ink is older than it is.

Specifications

WebAuthn / PasskeysSingle-use TTL challengesMonotonic counter · clone detectionStrict origin / RP checksAsync-native · fully typedRedis · SQLAlchemy · in-memory adapters

The Proof

Open fastapi-passkeys on GitHub