Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

#214

Offer passkeys through conditional UI and require discoverable credentials

merged · by keenan 3d ago · merged into main at ef0b1b3e by keenan 3d ago

keenan opened this 3d ago

Summary

Follows the Passkey Central required pattern for signing in with a passkey: autofill/conditional UI, a working identifier-first fallback, and discoverable credentials that autofill can find.

Stacked on #212. This branch is based on security-review-fixes because both touch the sign-in handlers. Retarget it to main once #212 lands.

What changed

  • Server: LoginBegin with no username starts BeginDiscoverableLogin. LoginFinish uses FinishDiscoverableLogin, finds the account by credential id, and refuses a user handle that does not match it. The account is only resolved after the assertion, so an empty begin reveals nothing about a name.
  • Browser: when PublicKeyCredential.isConditionalMediationAvailable() reports support, the login page starts a conditional ceremony and calls navigator.credentials.get({publicKey, mediation: "conditional"}). A saved passkey can then be selected from the account field. Cancellation and a missing passkey are silent; the form remains the fallback.
  • Registration: invitation, self-registration, and adding a passkey now ask for residentKey: required. New passkeys are discoverable, user verification stays required, and attestation stays none.
  • Docs: the browser sign-in section explains autofill, discoverable credentials, and the username-first fallback for a passkey created before this change.

The template already had autocomplete="username webauthn"; the missing part was the conditional ceremony and a discoverable server flow.

Tests

  • Empty-username begin returns no allowCredentials and requires user verification.
  • Registration options ask for a resident key and user verification.
  • The existing username-first flow, the #209 input bounds, and the #212 cache changes still pass.

vole workflow check and vole workflow run verify pass. Conditional UI itself was checked by syntax and code review; a real browser/authenticator test is still manual because the test suite has no virtual authenticator.

Related: #212, #213.

Discussion (0)

No discussion yet.