mozilla / authenticator-rs

Rust library to interact with Security Keys, used by Firefox
https://crates.io/crates/authenticator
Mozilla Public License 2.0
273 stars 70 forks source link

USB transport isn't working and always showing passkey as the first option #330

Closed andreydanil closed 7 months ago

andreydanil commented 7 months ago

Since the release of Firefox 122, users have encountered a new popup for the WebAuthn challenge, and a critical functionality related to the transport is currently malfunctioning.

In the previous versions of Firefox (older than 122), the "usb" transport used that the respective authenticator over removable USB. Now, a user has to select the USB authenticator manually, which leads to user confusion since passkeys may not be enabled with the WebAuthn registration.

Steps to reproduce:

  1. Open Firefox 122.
  2. Go to https://webauthn.me/debugger.
  3. Scroll down and Click the register button.
  4. Select the "Security key" option and press continue.
  5. Touch the security key to register it with WebAuthn.
  6. Scroll down and click the Authenticate button.
  7. In the navigator.credentials.get API, check the "allowCredentials" "transports" and "USB".
  8. Click Authenticate and observe that the sign in options present iPhone, iPad, or Android device as the default, followed by the security key second. Note the manual selection requirement for the USB authenticator.

This user experience presents a significant inconvenience as users are currently required to interact with the security key twice. First, users need to press the security key to confirm its presence, and secondly, to authenticate with the challenge response. Additionally, if User Verification (UV) is enabled on the key, the flow becomes touch the key, enter the PIN, and then press the key again. This redundancy not only disrupts the fluidity of the authentication process but leads to user frustration and confusion due to the additional steps involved, especially when the user only registered a security key, not a passkey.

Expected Behavior:

The "usb" transport should default to security key (see Chrome as an example), requiring no additional user intervention.

Firefox 122 - with the USB transport, the phone is the default option:

image

Chrome (121.0.6167.139) - respects the USB transport:

image

Previously in Firefox 121, the USB transport option supported the USB transport and not prompted for a Passkey.

Firefox 121 (shows touch your security key in the top left of the window):

image
andreydanil commented 7 months ago

Bugzilla ticket for tracking: https://bugzilla.mozilla.org/show_bug.cgi?id=1859367.

jschanck commented 7 months ago

Firefox 122 is using the macOS platform API in your screenshots; authenticator-rs is not involved.