[WebAuthn] macOS Firefox 127 still asks to touch a security key with password twice
Categories
(Core :: DOM: Web Authentication, enhancement)
Tracking
()
People
(Reporter: vrac, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0
Steps to reproduce:
Go to a website that uses a security key with a pin password
Try to login (email + pass), then it's time for the security key part
Actual results:
1/ Firefox asks to touch a security key connected to the computer
2/ after the first touch the pin is asked
3/ then a second touch is needed to complete the login process
Expected results:
1/ the security key pin should be asked straight ahead, especially if there is only one security key available.
2/ then a touch to allow the login process to complete
The process is a little bit better than the versions before 127 (there was even one more step before as detailed in #1878742 and #1894876 ) but the fist step is still useless. For example it works well in Brave browser, the browser asks straight for the pin if the security key is connected to the computer.
On the other hand, since version 127 the process is now perfectly fine for websites that does not require a PIN code (U2F vs WebAuthn).
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Web Authentication' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
The problem has became worse since the last versions of Firefox for Mac.
I'm using 132.0.2 (aarch64) and when I want to log on on my bank website here is what I have to do :
1/ touch the security key -> nothing seems to happen
2/ touch the security key a second time -> now it asks for my security key pin number
3/ enter my pin number (normal) and click continue
4/ touch the security key -> nothing seems to happen
5/ touch the security key a second time -> at last I'm connected to my bank account
When doing the same thing in Brave or Safari :
1/ I'm straight beeing asked for my security key PIN number
2/ I'm asked to touch the security key -> I'm loggd on
I updated both Mac OS and Firefox (Mac OS 15.2 and Firefox 133.0.3) and the behavior returned to the one in the fist post: touch - password - touch.
Still one useless touch before the password.
Still no improvement (Now with firefox 137 and Mac OS 15.3.2). Am I the only one having this problem?
Comment 5•4 months ago
|
||
I have a few questions for you:
-
When Firefox prompts you to touch your security key to login to your banking website, does it show you:
- A: macOS' passkey prompt (looks the same as Safari's; it darkens the entire Firefox window, and has a dialog that asks if you want to use iCloud Keychain, a mobile device or a security key to sign in).
- B: Firefox's native WebAuthn prompt (pops up a small notification near the address bar that says "touch your security key")
-
Which bank website are you trying to log in to? This may tell us what options it is trying to send, and why Firefox is choosing a certain prompt (eg: it requests an extension that macOS doesn't support, but Safari would normally drop).
-
What authenticator device are you using, and (if possible) what firmware version is it running?
-
Is the authenticator device plugged directly into your Mac, or is it connected via a hub or dock?
-
Re: "getting worse" (Comment 2), does this still occur if you unplug your authenticator, then quit all other web browsers (and programs that embed web browsers), then reconnect your authenticator, then try to log in with Firefox? It seems like some other application has a channel open to your authenticator, and Firefox's channel is getting stomped.
For context, when you have multiple connected security keys, or the possibility to use another device to authenticate, then you should have to touch your security key at most twice (once to select a device, and once to authenticate after entering your PIN).
If it is possible, skipping straight ahead (Comment 0) is what Firefox does on other platforms (eg: Linux).
I have a suspicion about why this isn't happening on macOS, but only if it Firefox is using its native WebAuthn prompt (I suspect authenticator-rs does not enumerate existing devices on macOS).
But it would be better if Firefox used macOS passkey prompts instead (because then it would work the same as Safari, and mean that you can use all the things it offers rather than just USB).
There's a few possibilities for how to solve the issue, but it really depends which flow it uses.
Yeah !
1 - A : it darkens the whole Firefox window. I guess it is a Mac OS window (see https://imgur.com/Rj3qtOd . In Brave it is another window: https://imgur.com/Xn6xUTn )
2 - the bank is boursobank ( https://clients.boursobank.com/ )
3 - Yubikey 5C nano (firmware 5.4.3) / Same problem with a 5 NFC. Only one security is connected on the laptop. I don't have any other "security device" (no iPhone for example).
4 - yes directly on the Mac
5 - I never got this problem back after version 133. Even after a complete reboot and the first use of the security key.
Comment 7•4 months ago
|
||
Thanks for that!
What you're seeing in https://imgur.com/Rj3qtOd is indeed the macOS WebAuthn API (used by default in Firefox 122 and later), so that's responsible for communicating with both local devices and iCloud Keychain on Firefox's behalf.
This means that macOS is responsible for how many touches you need to make.
When I tested with Firefox 152.0.5 (aarch64) on macOS 15.7.7, a WebAuthn login request with user verification and a single enrolled security key (ie: 1 credential ID) always needs two taps (same as you reported in Comment 0 and Comment 3), even if there's only one security key plugged in.
I'm also seeing the same in Safari, which uses the same API as Firefox.
You can force Firefox to use its native WebAuthn implementation instead of macOS':
- Visit
about:config - Click "Accept the risk and continue"
- Search for
security.webauthn.enable_macos_passkeys, and double-click the entry to set it tofalse(it defaults totrue) - Completely quit Firefox and re-open it for the change to take effect
If you want to switch back, repeat the same steps again, but set security.webauthn.enable_macos_passkeys to true.
When security.webauthn.enable_macos_passkeys is false, Firefox will only be able to use passkeys on USB authenticators. You won't be able to use or store passkeys in iCloud Keychain, Android or iOS devices, or Bluetooth or NFC-only authenticators.
When I used Firefox with its native WebAuthn implementation, then I only need to touch once (same as on Linux, which also uses this). It even does this if there are multiple enrolled security keys, but only one valid one is connected.
In Brave it is another window
What you're seeing in Brave is Chromium's WebAuthn UI, which connects to local devices directly, and only switches to macOS' WebAuthn UI when you choose the first option (to use iCloud Keychain).
Applications aren't (currently) forced to use the macOS WebAuthn UI to communicate with local devices, and Chromium opted to make using iCloud take an extra click (and Chrome's prompt has Google Password Manager).
Firefox could do something similar, but it would require a significant redesign to allow switching WebAuthn backends while a request is in progress (which is only relevant on macOS), and would add an extra click to using iCloud Keychain. Apple could also decide to lock down local authenticator access (like Microsoft did in Windows 10), which would it impossible to use Firefox's native WebAuthn implementation.
I think the best way forward is to attempt advocacy with Apple (because it affects Safari too).
5 - I never got this problem back after version 133
Ah, sorry, I missed your Comment 3 where you said it went back to only needing two touches.
You are 100% correct (of course).
I tried your suggestion to disable enable_macos_passkeys and it is working as advertised. It directly asks for the PIN code of the yubikey 😍
That's a nice workaround.
Comment 9•4 months ago
|
||
Awesome. 🎉
For what it's worth, I found one case where macOS' WebAuthn API only required single-touch on a USB authenticator to login to a site that required user verification: using an authenticator with a fingerprint reader (or other "built-in user verification method"). But those are much bigger (ie: no "nano key"), more expensive, and fingerprint readers don't work for everyone.
I've poked Mozilla folks to pass it on to Apple contacts, because this affects Safari too. If your organisation has an enterprise support agreement with Apple, it may be worth mentioning it to someone there too.
But for now, I'm going to close this out, because I don't think there's much Firefox can do about macOS' behaviour.
Description
•