Unable to associate yubikey #4081

Closed
opened 2026-03-07 19:27:47 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @delusi0n on GitHub (Oct 9, 2019).

When I try to associate a Yubikey, I receive the following error:

[2019-10-09 18:48:15][rocket::rocket][INFO] POST /api/two-factor/get-yubikey application/json; charset=utf-8:
[2019-10-09 18:48:15][_][INFO] Matched: POST /api/two-factor/get-yubikey (generate_yubikey)
[2019-10-09 18:48:15][_][INFO] Outcome: Success
[2019-10-09 18:48:15][_][INFO] Response succeeded.
[2019-10-09 18:48:19][rocket::rocket][INFO] PUT /api/two-factor/yubikey application/json; charset=utf-8:
[2019-10-09 18:48:19][_][INFO] Matched: PUT /api/two-factor/yubikey (activate_yubikey_put)
[2019-10-09 18:48:19][bitwarden_rs::error][ERROR] Invalid Yubikey OTP provided.
[CAUSE] DecodeError(
    InvalidByte(
        0,
        34,
    ),
)
[2019-10-09 18:48:19][_][INFO] Outcome: Success
[2019-10-09 18:48:19][_][INFO] Response succeeded.

The UI gives an error of "Invalid Yubikey OTP Provided"

I've added the environment variables for the API id and secret as well..

YUBICO_CLIENT_ID=12345
YUBICO_SECRET_KEY="abcdsafjdskajfhaskjfhaskfjhsdakjhas=" (sanitized of course)

Any ideas? bitwarden_rs v. 1.11.0

Originally created by @delusi0n on GitHub (Oct 9, 2019). When I try to associate a Yubikey, I receive the following error: ``` [2019-10-09 18:48:15][rocket::rocket][INFO] POST /api/two-factor/get-yubikey application/json; charset=utf-8: [2019-10-09 18:48:15][_][INFO] Matched: POST /api/two-factor/get-yubikey (generate_yubikey) [2019-10-09 18:48:15][_][INFO] Outcome: Success [2019-10-09 18:48:15][_][INFO] Response succeeded. [2019-10-09 18:48:19][rocket::rocket][INFO] PUT /api/two-factor/yubikey application/json; charset=utf-8: [2019-10-09 18:48:19][_][INFO] Matched: PUT /api/two-factor/yubikey (activate_yubikey_put) [2019-10-09 18:48:19][bitwarden_rs::error][ERROR] Invalid Yubikey OTP provided. [CAUSE] DecodeError( InvalidByte( 0, 34, ), ) [2019-10-09 18:48:19][_][INFO] Outcome: Success [2019-10-09 18:48:19][_][INFO] Response succeeded. ``` The UI gives an error of "Invalid Yubikey OTP Provided" I've added the environment variables for the API id and secret as well.. ``` YUBICO_CLIENT_ID=12345 YUBICO_SECRET_KEY="abcdsafjdskajfhaskjfhaskfjhsdakjhas=" (sanitized of course) ``` Any ideas? bitwarden_rs v. 1.11.0
Author
Owner

@MartB commented on GitHub (Oct 20, 2019):

Works fine for me with master on 95a7ffdf6b

The only 2fa things i get in the logs are these:

Oct 20 16:44:51 martb-server bitwarden_rs[15952]: [2019-10-20 16:44:51][bitwarden_rs::error][ERROR] JsonError. {"TwoFactorProviders":[0,3],"TwoFactorProviders2":{"0":null,"3":{"Nfc":true}},"error":"invalid_grant","error_description":"Two factor required."}
Oct 20 16:45:00 martb-server bitwarden_rs[15952]: [2019-10-20 16:45:00][_][WARN] Response was `None`.
Oct 20 16:45:00 martb-server bitwarden_rs[15952]: [2019-10-20 16:45:00][_][WARN] Responding with 404 Not Found catcher.
@MartB commented on GitHub (Oct 20, 2019): Works fine for me with master on 95a7ffdf6ba5c331c67155f9b7e558300eb0a908 The only 2fa things i get in the logs are these: ``` Oct 20 16:44:51 martb-server bitwarden_rs[15952]: [2019-10-20 16:44:51][bitwarden_rs::error][ERROR] JsonError. {"TwoFactorProviders":[0,3],"TwoFactorProviders2":{"0":null,"3":{"Nfc":true}},"error":"invalid_grant","error_description":"Two factor required."} Oct 20 16:45:00 martb-server bitwarden_rs[15952]: [2019-10-20 16:45:00][_][WARN] Response was `None`. Oct 20 16:45:00 martb-server bitwarden_rs[15952]: [2019-10-20 16:45:00][_][WARN] Responding with 404 Not Found catcher. ```
Author
Owner

@dani-garcia commented on GitHub (May 13, 2020):

Closed due to inactivity.

@dani-garcia commented on GitHub (May 13, 2020): Closed due to inactivity.
Author
Owner

@dannymertens commented on GitHub (Jan 30, 2021):

Any news about this because I have the same problem, tested my key @ https://demo.yubico.com/otp/verify works fine
Also with the hosted version of Bitwarden everything works fine, only my self hosted version on my Synology (docker) does not work, always get the same error Invalid Yubikey OTP Provided

Version 2.17.1

Thanks!

@dannymertens commented on GitHub (Jan 30, 2021): Any news about this because I have the same problem, tested my key @ https://demo.yubico.com/otp/verify works fine Also with the hosted version of Bitwarden everything works fine, only my self hosted version on my Synology (docker) does not work, always get the same error Invalid Yubikey OTP Provided Version 2.17.1 Thanks!
Author
Owner

@BlackDex commented on GitHub (Jan 30, 2021):

@dannymertens, its not very useful to reply on a closed ticket.
Also, most of the time this is a user error. Please make sure you have https working and the domain variable is correctly configured.

Also, there is a newer version available.
And if you would use the testing tagged image, you will get some nice diagnostics which could help in the admin interface.

@BlackDex commented on GitHub (Jan 30, 2021): @dannymertens, its not very useful to reply on a closed ticket. Also, most of the time this is a user error. Please make sure you have https working and the domain variable is correctly configured. Also, there is a newer version available. And if you would use the `testing` tagged image, you will get some nice diagnostics which could help in the admin interface.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#4081