Repository navigation
Conversation
A phone holding passkeys for two Hosted accounts showed two identical "Dormouse Pocket (relay.dormouse.sh)" entries. Hosted's setup/begin now answers an optional `accountEmail`, and Pocket names a passkey it creates "<email> (Dormouse.sh)". Older Pockets ignore the field; a Relay that sends none (selfhost, or an older Hosted) keeps the old name. Existing passkeys are untouched, since sign-in never reads the name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
348d1e6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5f74dc28.mouseterm.pages.dev |
| Branch Preview URL: | https://passkey-email-label.mouseterm.pages.dev |
dormouse-bot
left a comment
There was a problem hiding this comment.
The new disclosure is recorded only in docs/specs/hosted.md, but AGENTS.md → "Specs" makes docs/specs/security.md the one place that states each accepted risk ("It alone states each known gap and accepted risk"). Its "What is not defended" bullet for setup QRs (Whoever first redeems a live setup QR adds a passkey to your account and is signed in) still describes only what redeeming grants. Someone who only photographs a live code can now call setup/begin and learn the owner's email, without redeeming it. That is a personal identifier, unlike the opaque account and credential IDs begin already returns, and /security readers never see the hosted.md table cell. Consider adding a clause there and cutting the hosted.md parenthetical down to a pointer. Adding words may need node scripts/spec-lint.mjs --ratchet docs/specs/security.md.
| rpId: rpIdOf(c.env), | ||
| accountId: minter.userId, | ||
| existingCredentialIds: minter.credentialIds, | ||
| ...(minter.email ? { accountEmail: minter.email } : {}), |
There was a problem hiding this comment.
Better Auth's user.email is NOT NULL, and this query inner-joins "user", so no Hosted row reaches the empty branch. The field can be unconditional, which also lets the row type above say email: string:
| ...(minter.email ? { accountEmail: minter.email } : {}), | |
| accountEmail: minter.email, |
A phone holding passkeys for two Hosted accounts shows two identical "Dormouse Pocket (relay.dormouse.sh)" entries in its passkey picker, with no way to tell which signs in to which set of computers. #1804 makes that case routine.
POST /api/setup/beginanswers a new optionalaccountEmail: the minting account's email (remote-lib-common/src/remote/wire.ts,hosted/server/relay-api.ts).<email> (Dormouse.sh)when the field is present, andDormouse Pocket (<rpId>)as before when it is not (passkeyUserNameinlib/src/remote/client/webauthn.ts).Compatibility. The field is optional both ways. A Pocket that predates it ignores it. A Pocket reading a Relay that sends none (selfhost, or a Hosted deploy older than this) keeps the old name. Existing passkeys keep their names, since WebAuthn cannot rename one and sign-in never reads it. To relabel a phone's existing passkeys, delete them and pair again.
Disclosure.
setup/beginanswers whoever holds a live setup code, so someone who photographs a QR now also learns the owner's email, as they already learn the account ID and passkey IDs, until the code expires or is spent.docs/specs/hosted.mdrecords it.Tests: the new tests in
webauthn.test.ts,pocket-client.test.ts, andhosted/server/tests/relay.test.tseach fail with their fix line removed. Not yet tried on a real phone.🤖 Generated with Claude Code