Files
thePR0M3TH3ANandClaude Fable 5 fa9e2d9665 Automated passkey e2e: real Chromium, real WebAuthn ceremonies, virtual PRF
Discharges most of the 'live-fire passkey on a real device' TODO without
hardware. Playwright drives headless Chromium with a CDP virtual
authenticator (hasPrf: true) against the built demo served locally and
pointed at three in-process mock relays, so the test is hermetic -- no
public relays, no platform passkey provider, no network.

Covered end to end: navigator.credentials.create, PRF extension results
crossing the browser boundary, worker-side derivation, account
registration (asserted at the PROTOCOL layer -- kind-30078 capsules
really land on the relays, not just a UI state), the Tier B2 phrase card
appearing for a first session and not a returning one,
window.bitlogin.activeSession() reporting, logout, then
navigator.credentials.get signing back in to the SAME npub. A second
test proves PRF is per-credential: a different passkey derives a
different account.

Two things the harness taught us, both now encoded: WebAuthn rejects a
bare 127.0.0.1 as an RP id (localhost only), and the options menu's
disclosure state survives re-renders by design, so the driver opens it
conditionally.

Runs inside npm test and skips itself when the Playwright browser isn't
installed, so CI and other machines stay green. MockRelay gains
storedEventKinds() for protocol-level assertions. Remaining real-device
gap is recorded in TODO: a genuine platform authenticator and the
create-time-PRF-absent fallback, which the virtual authenticator does
not exercise.

268 tests green.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-04 14:57:10 -04:00

13 lines
549 B
JSON

{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist-types",
"rootDir": "src",
"noEmit": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"]
},
"include": ["src"],
"//": "src/e2e is excluded from THIS project's typecheck only: it imports @bitlogin/core's test-support by relative source path, because test-support is deliberately not a package export (it must never ship), and a cross-package source import violates rootDir. Vitest still type-resolves and runs those files.",
"exclude": ["src/e2e"]
}