Security model
WithPasskey is non-custodial by construction: private keys are generated and stored on user devices by the platform authenticator. The broker only ever sees public credential material.
Table of contents
What the broker stores
- public key + signature counter per credential
- hashed server secrets (
sk_…are stored as SHA-256 hashes, never the secret itself) - pairwise
subvalues (HMAC-peppered; unlinkable across applications) - auth-request state machines with short TTLs; codes and tickets stored hashed
- tenant-scoped audit events
What it never stores
No PII, no secrets
No passwords, no email addresses, no phone numbers, no names — the schema has no PII columns. Private keys cannot be exported by design; userRef values you attach to enrollment tickets are opaque strings, not identity.
Assertion guarantees
- ES256 signature, kid-pinned to a rotating JWKS set;
/.well-known/jwks.jsonexposes only public keys - 120-second expiry — an assertion is evidence of a ceremony, not a session
- One-time authorization codes (60s) + PKCE S256 — interception without the verifier is useless
- acr
urn:withpasskey:acr:passkeyasserts a passkey ceremony produced the token - jti + rid make each assertion replay-detectable
Origin and redirect binding
redirect_uri must match a verified application origin exactly — scheme, host, port, path. Origins verify via DNS TXT (_withpasskey.<host>) or a /.well-known/withpasskey challenge; local development auto-verifies *.localhost. WebAuthn credentials are bound to rpId withpasskey.xyz — one passkey serves every verified origin of the account.
Tenant isolation
Every tenant-scoped table carries PostgreSQL FORCE ROW LEVEL SECURITY keyed on app.tenant_id — set inside each transaction, failing closed when unset. The public API role is a subject of those policies; only the worker/admin roles (separate credentials) may bypass. A compromised relying party sees only its own pairwise ids.
Recovery, not reset
No reset email exists
There is no email to phish and no reset link to intercept. pkr-… recovery codes are generated at enrollment, shown once, and consumed on use. If all codes are lost and no device retains a passkey, the account cannot be recovered — operators can mint a fresh code set for a known user id, which is why admin access stays out of user-facing paths.