fix(creation-profiles): default rp.name to rp.id when empty (#893)#896
Merged
Conversation
Removing the deprecated `webauthn.creation_profiles.*.rp.name` node, as the 5.3.0 deprecation message instructs, made the bundle emit `rp.name = ""`. Recent Chrome/Firefox builds tolerate the missing name, but SimpleWebAuthn's browser bindings (used by @web-auth/webauthn-stimulus) refuse to call `navigator.credentials.create()` when `rp.name` is empty (per W3C IDL it is required), so adding authenticators to existing users silently failed. PublicKeyCredentialCreationOptionsFactory now falls back to the configured `rp.id` whenever `rp.name` is empty, mirroring the fix shipped in #889 for the 5.4 helper API.
Spomky
added a commit
that referenced
this pull request
May 18, 2026
* 5.3.x: fix(creation-profiles): default rp.name to rp.id when empty (#893) (#896) feat(stimulus): ship TypeScript type declarations (.d.ts) for the npm package (#895) fix(origins): accept non-URL facet IDs (e.g. android:apk-key-hash:...) in allowed origins (#894) # Conflicts: # src/stimulus/assets/src/authentication-controller.js # src/stimulus/assets/src/base-controller.js # src/stimulus/assets/src/controller.js
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.
Summary
Refs #893 (the framework side; the documentation legs are tracked in web-auth/doc#57, web-auth/doc#58 and web-auth/doc#59).
Per W3C IDL,
PublicKeyCredentialEntity.nameis required:dictionary PublicKeyCredentialEntity { required DOMString name; };The 5.3.0 release deprecated the
webauthn.creation_profiles.*.rp.nameconfiguration node. When users follow the deprecation message and remove the node, the configuration default falls back to'', soPublicKeyCredentialCreationOptionsFactory::createRpEntityproduced{"rp": {"name": "", "id": "..."}}.Recent Chrome / Firefox builds tolerate the empty name and fall back to the eTLD+1, but SimpleWebAuthn's browser bindings (
@simplewebauthn/browser@13.x, pulled in by@web-auth/webauthn-stimulus@5.3.x) refuse to callnavigator.credentials.create()whenrp.nameis empty: the registration silently fails after the options endpoint returns 200.Fix
When the configured
rp.nameis an empty string, fall back to therp.id. The id is a human-readable hostname and is therefore a sensible default display label, and the JSON now always carries a non-empty name.This mirrors the equivalent fix on the 5.4 helper API in #889.
BC
Strictly additive on the runtime serialisation side: profiles that still configure a non-empty
rp.nameare unchanged, and the deprecated node keeps emitting the same deprecation warning at config-build time.