bitwarden / web

The website vault (vault.bitwarden.com).
https://vault.bitwarden.com
Other
2.58k stars 405 forks source link

Yubikey "Key 1 is Invalid" Error on 2FA Settings #264

Closed iaji closed 6 years ago

iaji commented 6 years ago

I have a yubikey 4 nano configured for OTP. For some reason I cannot get bitwarden to accept my yubikey OTP output. I have done some searching but have been unable to identify a solution yet.

kspearrin commented 6 years ago

Does it work here? https://demo.yubico.com/

iaji commented 6 years ago

It fails there as well.

kspearrin commented 6 years ago

You should contact Yubico to figure out why.

iaji commented 6 years ago

thanks for the quick response

ianklug commented 6 years ago

I'm having a problem similar to this, but I don't believe it is my keys that are faulty.

I have two Yubikey 5 NFC keys. Using the web vault in Firefox 63 on Ubuntu 18.04, they register as U2F keys with no issue, however when attempting to register either of them as YubiKey OTP so they will work with NFC, I receive an error "Key1 is invalid."

This does not seem to occur in Chrome 70, where I was able to register the same keys as YubiKeys without issue.

The response payload returned by the PUT request to save the keys is as follows: {"Message":"The model state is invalid.","ValidationErrors":{"Key1":["Key1 is invalid."]},"ExceptionMessage":null,"ExceptionStackTrace":null,"InnerExceptionMessage":null,"Object":"error"}

kspearrin commented 6 years ago

Does it work here? https://demo.yubico.com/

ianklug commented 6 years ago

Yes, I tested each of my keys on the demo site in both Firefox and Chrome. They are identified and their correct serial numbers are given.

I have thought that perhaps this is related to one of my Firefox extensions. I will try again with some of them disabled and see if that works.