cedarcode / webauthn-ruby

WebAuthn ruby server library ― Make your Ruby/Rails web server become a conformant WebAuthn Relying Party
https://rubygems.org/gems/webauthn
MIT License
644 stars 51 forks source link

Add support for credential backup flags #378

Closed santiagorodriguez96 closed 1 year ago

santiagorodriguez96 commented 1 year ago

What

Add ability to access the backup_eligibility and backup_state flags in the authenticator data.

Introduces the methods PublicKeyCredential#backup_eligible? and PublicKeyCredential#backed_up? to access them.

Why

Level 3 of the draft adds this flags to the Authenticator Data: https://w3c.github.io/webauthn/#sctn-credential-backup. Those flags can be used to get information about credential's backup eligibility and current backup state. With the introduction of multi-device FIDO credentials, this information can be useful for Relying Parties. According to the documentation:

The following is a non-exhaustive list of how Relying Parties might use these flags: