Skip to content

feat(passkey): drop the naming step from enrollment - #140

Merged
Bccorb merged 1 commit into
mainfrom
feat/drop-passkey-naming-step
Sep 3, 2026
Merged

feat(passkey): drop the naming step from enrollment#140
Bccorb merged 1 commit into
mainfrom
feat/drop-passkey-naming-step

Conversation

@Bccorb

@Bccorb Bccorb commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What

Removes the "Name This Device" modal from the bundled /register-passkey view. Choosing Register Passkey (or Use a security key instead) now goes straight to the browser's WebAuthn prompt.

Why

The modal sat between the button and the ceremony: a user who came to the screen to press one button was handed a text field first, at the point in the flow where they had the least idea what to type. The placeholder ("e.g., MacBook Pro, iPhone, YubiKey") was asking them to describe the device they were already sitting at.

How

  • Deleted DeviceNameModal.tsx, its stylesheet, and tests/DeviceModal.test.tsx.
  • PassKeyRegistration.tsx loses the showDeviceModal / pendingMetadata / pendingAttachment state and the two-step openDeviceModal to continueRegistration split, collapsing to one registerPasskey(attachment?).
  • friendlyName is filled from parseUserAgent().deviceInfo (for example mac • chrome), which is what the naming prompt suggested people write anyway. Renaming stays available through updateCredential.

Scope

PasskeyMetadata.friendlyName is unchanged, so a caller building their own enrollment screen keeps setting it. Only the bundled view changes, which means an adopter relying on that screen to collect a name needs their own screen for it. Called out in the changeset.

Checks

npm run typecheck, npm run lint, npm run format:check, and npm test all pass (309 tests, 31 suites). Test coverage for PassKeyRegistration.tsx stays at 100% of statements and lines.

Choosing "Register Passkey" opened a modal asking for a friendly name, and the
browser's own passkey prompt only appeared once that form was submitted. A user
who came to the screen to press one button was handed a text field first, at the
point in the flow where they had the least idea what to type.

Registration now starts on the click. The credential still carries a
friendlyName, filled with the device it was enrolled on, which is what the prompt
suggested people write anyway. Renaming stays available through updateCredential.

The public API does not move: PasskeyMetadata.friendlyName is unchanged and a
caller building their own enrollment screen keeps setting it. Only the bundled
/register-passkey view changes.
@Bccorb
Bccorb merged commit 8690cb0 into main Sep 3, 2026
2 of 3 checks passed
@Bccorb
Bccorb deleted the feat/drop-passkey-naming-step branch September 3, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant