Error when registering a U2F device
Issue When I try to add my Yubico security key (the blue one, that supports U2F, not the original Yubikey 4/5), I get a generic error that appears almost immediately after clicking on the "Read key" button.
I've got a "error: 2" when debugging from the JS console:
I also checked the logs from the Docker container, but nothing stands out.
Steps to reproduce
- Go to the Two Factor Authentication section on the Settings page, then click on the button to add a FIDO U2F security key.
- Plug in the Yubico U2F Security Key.
- Write a random name in the field.
- Click on "Read key"
Additional details I'm using an "on-premises" deployment of Bitwarden. The app is served behind a reverse proxy (Nginx), that handles the HTTPS encryption.
Is the U2F appid available?
https://webvault.com/app-id.json
Does it contain the correct information?
@kspearrin It seems to be correct, as far as I can tell :
{
"trustedFacets": [
{
"version": {
"major": 1,
"minor": 0
},
"ids": [
"https://xxxxxxx",
"ios:bundle-id:com.8bit.bitwarden",
"android:apk-key-hash:xxxxxxxxx"
]
}
]
}
Is "https://xxxxxxx", your web vault's URL?
Yes, I obfuscated it but the actual URL is valid
To determine whether the U2F key could be causing this issue or not, I tried to click on "Read key" without any key inserted, and the very same thing happens. So I guess it's not related to this specific model...
So I double checked my configuration, and it appears some URLs in bwdata/env/global.override.env were using HTTP instead of HTTPS... Updating them and restarting the container allowed U2F registration to work flawlessly.
My bad! And thanks for your help @kspearrin, and for the awesome work in maitaining Bitwarden 😄
Im having the same issue. How do I go about checking my URLS to make sure they are correct? And if not, making the change? When typing in https://webvault.com/app-id.json I get the following:
{"trustedFacets":[{"ids":["http://xxxxx","ios:bundle-id:com.8bit.bitwarden","android:apk-key-hash:xxxxxxxxxx"],"version":{"major":1,"minor":0}}]}