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/reg-hints #653

Merged
merged 4 commits into from
Dec 6, 2024
Merged

feat/reg-hints #653

merged 4 commits into from
Dec 6, 2024

Conversation

MasterKale
Copy link
Owner

This PR adds support for registration-time WebAuthn hints as the new preferredAuthenticatorType argument in generateRegistrationOptions(). The following values are supported:

  • 'securityKey'
  • 'localDevice'
  • 'remoteDevice'

Each maps to the following combinations of PublicKeyCredentialHint (and AuthenticatorAttachment for backwards compatibility) in registration options:

  • 'securityKey' ➡️ ['security-key'] / 'cross-platform'
  • 'localDevice' ➡️ ['client-device'] / 'platform'
  • 'remoteDevice' ➡️ ['hybrid'] / 'cross-platform'

WebAuthn hints do allow for multiple values and sorting by "decreasing preference". However I am taking the position here (after taking the same position when we drafted hints into the WebAuthn spec) that the greatest utility of hints comes from being able to fine-tune WebAuthn registration from two ceremonies ("platform, or security key/hybrid") into three ceremonies ("platform, security key, or hybrid".) This means only specifying one hint per ceremony for those RP's that wish for the greater degree of nuance when initiating passkey registration.

@MasterKale MasterKale added this to the v12.1.0 milestone Dec 6, 2024
@MasterKale MasterKale merged commit ff45a3b into master Dec 6, 2024
2 checks passed
@MasterKale MasterKale deleted the feat/reg-hints branch December 6, 2024 05:02
@MasterKale MasterKale added the package:server @simplewebauthn/server label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:server @simplewebauthn/server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant