[GH-ISSUE #260] Can't enable 2FA #134

Closed
opened 2026-03-03 01:25:41 +03:00 by kerem · 2 comments
Owner

Originally created by @SlothCroissant on GitHub (Nov 19, 2018).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/260

I couldn't enable 2FA on my new iPhone today when connecting to my vault hosted in Docker, and found that I couldn't login to the web UI with 2FA either. I was able to get in via a 'remembered' browser, and disabled 2FA.

Once I try to enable it, however, I get an "unexpected error" when validating the code (after adding it to Authy). Logs show the following:

POST /api/two-factor/get-authenticator application/json; charset=utf-8:
    => Matched: POST /api/two-factor/get-authenticator
    => Outcome: Success
    => Response succeeded.
PUT /api/two-factor/authenticator application/json; charset=utf-8:
    => Matched: PUT /api/two-factor/authenticator
ERROR: Invalid totp code
    => Outcome: Success
    => Response succeeded.

i've re-tried this many times with Google Auth, Authy, and Microsoft Authenticator, all with no success. Thoughts?

Originally created by @SlothCroissant on GitHub (Nov 19, 2018). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/260 I couldn't enable 2FA on my new iPhone today when connecting to my vault hosted in Docker, and found that I couldn't login to the web UI with 2FA either. I was able to get in via a 'remembered' browser, and disabled 2FA. Once I try to enable it, however, I get an "unexpected error" when validating the code (after adding it to Authy). Logs show the following: ``` POST /api/two-factor/get-authenticator application/json; charset=utf-8: => Matched: POST /api/two-factor/get-authenticator => Outcome: Success => Response succeeded. PUT /api/two-factor/authenticator application/json; charset=utf-8: => Matched: PUT /api/two-factor/authenticator ERROR: Invalid totp code => Outcome: Success => Response succeeded. ``` i've re-tried this many times with Google Auth, Authy, and Microsoft Authenticator, all with no success. Thoughts?
kerem 2026-03-03 01:25:41 +03:00
Author
Owner

@dani-garcia commented on GitHub (Nov 19, 2018):

I just tried to enable 2fa in a new accout and i can login just fine (this is using the web vault, with the rocket-0.4 branch, I can't compile the master branch at the moment).

Problems with 2fa ususally are caused by different timezones or problems with the clock sync. Can you make sure that both the server and the device connecting have the same time?

<!-- gh-comment-id:440006537 --> @dani-garcia commented on GitHub (Nov 19, 2018): I just tried to enable 2fa in a new accout and i can login just fine (this is using the web vault, with the rocket-0.4 branch, I can't compile the master branch at the moment). Problems with 2fa ususally are caused by different timezones or problems with the clock sync. Can you make sure that both the server and the device connecting have the same time?
Author
Owner

@dani-garcia commented on GitHub (Dec 13, 2018):

This hasn't had activity in some time, so I'm closing it now.
If this is still an issue, please reopen it.

<!-- gh-comment-id:447064474 --> @dani-garcia commented on GitHub (Dec 13, 2018): This hasn't had activity in some time, so I'm closing it now. If this is still an issue, please reopen it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#134
No description provided.