Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserEntity.DisplayName should not have omitempty #183

Closed
jameshartig opened this issue Nov 28, 2023 · 1 comment · Fixed by #184
Closed

UserEntity.DisplayName should not have omitempty #183

jameshartig opened this issue Nov 28, 2023 · 1 comment · Fixed by #184
Labels
status/needs-triage Issues that need to be triaged. type/bug Something isn't working

Comments

@jameshartig
Copy link

Version

0.9.1

Description

Its value’s name, displayName and id members are REQUIRED.

but when a user is registering for the first time the RP might not require the user to enter their name and the displayName might be empty, which would then get omitted and cause an error in JavaScript when calling navigator.credentials.create.

Reproduction

  1. Create a user with an empty displayName
  2. Pass user to wa.BeginRegistration.
  3. Encode the result as JSON
  4. Pass to navigator.credentials.create

Expectations

Expectation is that the resulting JSON would contain displayName: '' but instead displayName is undefined.

Documentation

https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-user

@jameshartig jameshartig added status/needs-triage Issues that need to be triaged. type/potential-bug Potential Bugs labels Nov 28, 2023
@james-d-elliott james-d-elliott added type/bug Something isn't working and removed type/potential-bug Potential Bugs labels Nov 28, 2023
@james-d-elliott
Copy link
Member

Thanks for reporting I'll fix and release this today. For reference the docs you linked to are a draft but this is valid regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/needs-triage Issues that need to be triaged. type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants