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

After upgrading to 3.2.0, both attestation and userVerification value are null and being included #441

Closed
mech opened this issue Nov 14, 2024 · 3 comments · Fixed by #442

Comments

@mech
Copy link

mech commented Nov 14, 2024

After upgrading to 3.2.0, it seems that both attestation and userVerification value become null and will be included into the final JSON. Although it worked for Safari keychain and Chrome profile, it did not work for 1Password.

On 3.1.0

create_options = WebAuthn::Credential.options_for_create(user: {id: WebAuthn.generate_user_id, display_name: "mech", name: "mech"})

create_options.to_json # This will not output `attestation` and it can work in 1Password.

On 3.2.0, the JSON will include the "attestation": null which don't work in 1Password.

2024-11-14-u18k7
@mech mech changed the title Missing attestation and userVerification value after upgrading to 3.2.0 After upgrading to 3.2.0, both attestation and userVerification value are null and being included Nov 14, 2024
santiagorodriguez96 added a commit that referenced this issue Nov 14, 2024
In Rails, `nil` responds to `as_json` therefore the attributes whose
value is `nil` are added to the result of `as_json`, which may end up
causing issues with some authenticators – see #441.

This commits adds another condition to the if in order to prevent
attributes with a `nil` value to be added to the resulting json.
santiagorodriguez96 added a commit that referenced this issue Nov 14, 2024
In Rails, `nil` responds to `as_json` therefore the attributes whose
value is `nil` are added to the result of `as_json`, which may end up
causing issues with some authenticators – see #441.

This commits adds another condition to the if in order to prevent
this from happening.
@santiagorodriguez96
Copy link
Contributor

Hi @mech 👋!

Thank you so much for the (very quick) report!

I've opened #442 to try to fix it. Let me know if it still doesn't work for you!

@santiagorodriguez96
Copy link
Contributor

@mech we've released v3.2.2 which should fix this! Let us know if this happens to not actually be fixed or if you run into any other issues.

Thanks!

@mech
Copy link
Author

mech commented Nov 15, 2024

Hi happy to report that it is working well with 1Password now 👏. Tks for the quick fix!

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 a pull request may close this issue.

2 participants