What is authenticatorSelection in WebAuthn?

Blog-Post-Author

Vincent

Created: December 18, 2023

Updated: September 10, 2024


What is authenticatorSelection?#

In WebAuthn, authenticatorSelection is an important part of the PublicKeyCredentialCreationOptions object. This feature enables Relying Parties (RPs) to specify criteria for selecting the appropriate authenticators during the create() operation. Its importance lies in:

Slack Icon

Become part of our Passkeys Community for updates and support.

Join

Example:#

"authenticatorSelection": { "authenticatorAttachment": "platform", "residentKey": "required", "requireResidentKey": false, "userVerification": "required", }

Continue reading for a breakdown of the possible values and configurations of authenticatorSelection.

Key Takeaways#

  • authenticatorSelection specifies requirements for choosing authenticators in WebAuthn.
  • It includes authenticator attachment modality and user verification requirements.
  • Enhances security by allowing precise control over the authentication process.

authenticatorSelection enables Relying Parties in WebAuthn to specify criteria for selecting the appropriate authenticators during the create() operation

authenticatorSelection in WebAuthn is essential for ensuring that the authentication process aligns with specific security requirements and user experience preferences. It offers Relying Parties the flexibility to tailor the registration process according to their security needs.

Here's an overview over the possible values, as specified in the WebAuthn specification:

authenticatorAttachment#

Possible values:

  • Platform: The authenticator is attached to the client's platform and is therefore not removable.
  • Cross-platform: The authenticator is not bound to the client's platform and can be used on multiple devices.

residentKey#

This value specifies whether the Relying Party wants to create a discoverable credential. Possible values are:

  • required: The authenticator must create a resident key and the operation should fail if this is not possible.
  • preferred: The authenticator should try to create a resident key and should create a non-resident key if this is not possible.
  • discouraged: The authenticator must create a non-resident keyand the operation should fail if this is not possible.

requireResidentKey#

This value is just used for backwards compatibility with WebAuthn level 1, being set to "true" if residentKey is set to "required".

Substack Icon

Subscribe to our Passkeys Substack for the latest news, insights and strategies.

Subscribe

userVerification#

This value indicates whether User Verification is required for the operation. Possible values are:

  • required: The operation must verify the user.
  • preferred: The operations should verify the user, but can proceed without it (standard value).
  • discouraged: The operation should not verify the user.

Warning: If set to "preferred" the authenticator may skip the user verification in the authentication process. Read more about this issue in this article.


authenticatorSelection FAQs#

What function does authenticatorSelection serve in WebAuthn?#

authenticatorSelection in WebAuthn allows Relying Parties to specify the type of authenticators that are suitable for their authentication process, including the requirement for user verification and the type of authenticator.

How does authenticatorSelection impact the user experience in authentication?#

It impacts user experience by determining the type of authenticator used (platform or roaming) and setting the level of user verification, thereby influencing the ease and security of the authentication process.

Debugger Icon

Want to experiment with passkey flows? Try our Passkeys Debugger.

Try for Free

What are the implications of the authenticatorAttachment setting in authenticatorSelection?#

The authenticatorAttachment setting in authenticatorSelection dictates whether a fixed platform authenticator or a removable cross-platform authenticator is required, affecting the physical and functional characteristics of the authentication process.

Share this article


LinkedInTwitterFacebook

Enjoyed this read?

🤝 Join our Passkeys Community

Share passkeys implementation tips and get support to free the world from passwords.

🚀 Subscribe to Substack

Get the latest news, strategies, and insights about passkeys sent straight to your inbox.


We provide UI components, SDKs and guides to help you add passkeys to your app in <1 hour

Start for free