Biometric unlock (Touch ID / Face ID) via WebAuthn PRF - #63
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A platform passkey's PRF output wraps the signed-in credentials (AES-GCM via HKDF) in localStorage; unlocking re-evaluates the PRF behind the OS biometric prompt. Purely client-side — the passkey is never registered with the backend and the master password is never stored. - Sign-in: "Use Touch ID / Face ID" button when enrolled; auto-fires once per page load (never after logout/cancel). Stale or dead enrollments self-clear with an explanatory message. - Settings: enroll button next to the username flips to a checked disabled state with an X to turn off. Master password changes clear the enrollment. - Post-login snackbar (top-center, away from the copy snackbars) offers enrollment to un-enrolled users; "Not now" opts out per device. - Unit tests simulate the PRF authenticator; e2e drives the full journey through Chromium's virtual authenticator.
xumaple
force-pushed
the
xumaple/claude/biometric-unlock
branch
from
July 16, 2026 04:04
2074aff to
d9b0221
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Touch ID / Face ID unlock for MapoPass, implemented entirely client-side with the WebAuthn PRF extension — no server changes, no new endpoints.
How it works: enrollment creates a platform passkey whose PRF output (Secure-Enclave-backed) is run through HKDF into an AES-GCM key that encrypts the signed-in credentials (
username,en_user,aesKey,en_pw) into localStorage. Unlocking re-evaluates the PRF — that's the OS biometric prompt — and decrypts. The passkey is never registered with the backend; the master password is never stored; the localStorage blob is useless without a biometric assertion. The plaintext username lives only inside the ciphertext (usernames are client-side-hashed secrets, so they must not leak into passkey metadata or storage).UX
Security notes
Testing
hasPrf): sign-up offer, settings enroll/disable, manual unlock, no-auto-fire-after-logout, reload auto-unlock with zero clicks, password change clearing enrollment, offer Enable path, offer retiring after settings enroll.CI=truebuild.