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

feat/backup-state #195

Merged
merged 16 commits into from
May 17, 2022
Merged

feat/backup-state #195

merged 16 commits into from
May 17, 2022

Conversation

MasterKale
Copy link
Owner

@MasterKale MasterKale commented Apr 13, 2022

This PR adds support for the new "Backup Eligibility" and "Backup State" flags being introduced in w3c/webauthn#1695. These new authenticator data flags will help RP's understand when a user registers an authenticator that is capable of backing up its credentials, and whether or not a particular eligible credential has been backed up.

Now, both verifyRegistrationResponse() and verifyAuthenticationResponse() will return the following new values in registrationInfo and authenticationInfo respectively:

  • credentialDeviceType: "singleDevice" | "multiDevice" indicating whether the credential might be usable from other authenticators
  • credentialBackedUp: bool indicating whether or not the credential has been backed up

These methods will also now fail when an authenticator returns the invalid combination credentialDeviceType: "singleDevice", credentialBackedUp: true because they indicate a misbehaving authenticator.

RPs should start persisting these values to the database for later reference to take action accordingly. Best practices of what to do when changes to credentialBackedUp are detected are still TBD pending formal adoption of the new flags and community discussion. See the PR linked above for a preview of such discussion. At this moment in time, though, RP's can likely start enforcing that an authenticator never returns a different value for credentialDeviceType after registration.

@MasterKale MasterKale added enhancement New feature or request package:server @simplewebauthn/server labels Apr 13, 2022
@MasterKale MasterKale changed the title Feat/backup-state feat/backup-state Apr 13, 2022
@MasterKale MasterKale merged commit 39a41ae into master May 17, 2022
@MasterKale MasterKale deleted the feat/backup-state branch May 17, 2022 05:52
@MasterKale MasterKale added this to the v5.2.0 milestone May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package:server @simplewebauthn/server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant