18F / identity-idp

Login.gov Core App: Identity Provider (IdP)
https://secure.login.gov/
Other
525 stars 112 forks source link

FIDO2 enrollment fails in Firefox because AuthenticatorAttestationResponse.getTransports() is not supported #8877

Closed danielrparks closed 1 year ago

danielrparks commented 1 year ago

Steps to reproduce the issue (please be as specific as possible)

Expected behavior

The enrollment should succeed.

Actual behavior

The enrollment fails and the page shows a generic error.

This is because https://github.com/18F/identity-idp/blob/main/app/javascript/packages/webauthn/enroll-webauthn-device.ts#L84 calls AuthenticatorAttestationResponse.getTransports(), which is unavailable on Firefox.

A simple stub polyfill should be all that is needed to enroll the key successfully:

if (navigator.userAgent.includes("Firefox")) {
  AuthenticatorAttestationResponse.prototype.getTransports = function(){return ["ble", "hybrid", "internal", "nfc", "usb"]}
}
aduth commented 1 year ago

Thanks for flagging this issue. I've tested and confirmed the behavior you reported in Firefox. I've added a bug ticket to our internal issue tracker, and we'll follow up here once this has been resolved.

Internal ticket: LG-10477

aduth commented 1 year ago

@danielrparks Following-up here, a fix has been merged to main, and should be available on the live site sometime later today.

Thanks again for the report!

danielrparks commented 1 year ago

Thanks, looks good!