Can't enable 2FA #133

Closed
opened 2025-11-07 06:25:13 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @SlothCroissant on GitHub (Nov 19, 2018).

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). 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?
GiteaMirror added the troubleshooting label 2025-11-07 06:25:13 -06: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?

@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.

@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.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#133