fix(passkey01): ask for one name, and say it is only a label - #198
Merged
Conversation
The onboarding form asked for a "user id (e.g. alice@example.com)" and a separate display name. Both are labels — WebAuthn's `user.name` and `displayName` exist so the passkey picker has something to show — but the first one read like an identifier, and until recently it was one: the identity provider derived the WebAuthn user handle from it, and an authenticator keeps one credential per (origin, handle). Two people typing the same name on one device therefore replaced each other's passkey, DID and all. The provider now generates a random handle (Le-Space/orbitdb-identity-provider-webauthn-did#45), so the text is finally just a label. One field, said plainly in a hint below it, and the placeholder stops inviting an e-mail address — `user.name` is still stored in the authenticator and shown in the picker, so a personal address remains a poor default even though it is no longer destructive. The create option now says what a second registration does, since repeating it adds a passkey rather than quietly replacing one. The E2E deliberately gives both browsers the same label. That is the regression test at app level: same typed name, two DIDs. Before the handle became random the run only passed because it worked around the collision with `alice-${runId}@example.com`. Verified: build succeeds, 45 unit tests pass. E2E needs the virtual authenticator and the released provider, so it was not run locally. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 16, 2026
NiKrause
added a commit
that referenced
this pull request
Aug 16, 2026
A patch release, and nothing in it forces a coordinated move: credentials registered under 0.5.0 keep working and the derived did:key is unchanged. What it brings this chapter is the random WebAuthn user handle (Le-Space/orbitdb-identity-provider-webauthn-did#45). Until now the handle was the UTF-8 of the typed user id, and an authenticator keeps one credential per (origin, handle) — so two people registering under the same name on one device destroyed each other's passkey and DID. The onboarding form that still invites that (#198) can land once this is in. Also in 0.5.1: largeBlob keystores actually persist their secret key, and the credential now carries the authenticator's own answer on extension support rather than the browser's guess. Bumped in all three tracked places plus the untracked pnpm-workspace.yaml, which is what a local pnpm 10/11 run actually reads. Note on the lockfile: generated with pnpm 11.15.1. Running pnpm 10 here re-resolved floating ranges across babel, metro and eslint — 552 lines of churn for a one-package bump. The 28 lines in this diff are the provider and its logger dependency, nothing else. Verified: build succeeds, 45 unit tests pass, the installed provider resolves to 0.5.1. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
NiKrause
marked this pull request as ready for review
August 17, 2026 11:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The onboarding form asked for a
user id (e.g. alice@example.com)and a separate display name. Both are labels — WebAuthn'suser.nameanddisplayNameexist so the passkey picker has something to show — but the first read like an identifier, and until now it was one: the provider derived the WebAuthn user handle from it, and an authenticator keeps one credential per (origin, handle). Two people typing the same name on one device replaced each other's passkey, DID and all.What changes
data-testid="passkey-label") instead of two, with a hint that says what it is: "Only a label for the passkey picker. Your identity comes from the key, not from this name — two people on this device may use the same one."user.nameis still stored in the authenticator and shown in the picker, so a personal address stays a poor default even though it is no longer destructive.The E2E is the point
passkey-identity.spec.jsnow gives both browsers the same label and expects two distinct DIDs. That is the regression test at app level: before the handle became random, the suite only passed because it worked around the collision withalice-${runId}@example.com.Verification
Build succeeds, 45 unit tests pass.
passkey-identity.spec.jsnow runs and passes locally against the released0.5.1. The files prettier still flags (README.md,+page.svelte,passkey-identity.spec.js) were already unformatted onpasskey01before this change;PasskeyOnboarding.svelteis clean.