[2026-04-14 15:52:29.471][request][INFO] POST /identity/accounts/prelogin
[2026-04-14 15:52:29.474][response][INFO] (prelogin) POST /identity/accounts/prelogin => 200 OK
[2026-04-14 15:52:29.796][request][INFO] POST /identity/connect/token
[2026-04-14 15:52:29.943][error][ERROR] Invalid two factor provider
[2026-04-14 15:52:29.943][response][INFO] (login) POST /identity/connect/token => 400 Bad Request
Screenshots or Videos
No response
Additional Context
My clients got logged out and wanted 2FA validation again, I suspect because of the 2FA troubles in recent releases. However, I use the bitwarden android app for my vaultwarden TOTP (yes, I know). I'd always planned to use the recovery code for a situation like this, but now it's not working.
Originally created by @bo0tzz on GitHub (Apr 14, 2026).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/7096
### Prerequisites
- [x] I have searched the existing **Closed _AND_ Open** [Issues](https://github.com/dani-garcia/vaultwarden/issues?q=is%3Aissue%20) **_AND_** [Discussions](https://github.com/dani-garcia/vaultwarden/discussions?discussions_q=)
- [x] I have searched and read the [documentation](https://github.com/dani-garcia/vaultwarden/wiki/)
### Vaultwarden Support String
(admin panel disabled, I can figure this out if it's needed)
### Vaultwarden Build Version
docker.io/vaultwarden/server:1.35.7-alpine
### Deployment method
Official Container Image
### Custom deployment method
_No response_
### Reverse Proxy
ingress-nginx 1.15.1
### Host/Server Operating System
Linux
### Operating System Version
Kubernetes
### Clients
Android, Web Vault, Browser Extension
### Client Version
web 2026.2.0
### Steps To Reproduce
1. Go to /recover-2fa page
2. Enter inputs
3. Hit submit
4. Toasts:
" Two-step login turned off on your account.
You have been logged in! "
5. 2FA not actually reset, not logged in
### Expected Result
2FA gets reset, I'm able to log in
### Actual Result
400 bad request:
```json
{
"MasterPasswordPolicy": {
"Object": "masterPasswordPolicy"
},
"TwoFactorProviders": [
"0"
],
"TwoFactorProviders2": {
"0": null
},
"error": "invalid_grant",
"error_description": "Two factor required."
}
```
### Logs
```text
[2026-04-14 15:52:29.471][request][INFO] POST /identity/accounts/prelogin
[2026-04-14 15:52:29.474][response][INFO] (prelogin) POST /identity/accounts/prelogin => 200 OK
[2026-04-14 15:52:29.796][request][INFO] POST /identity/connect/token
[2026-04-14 15:52:29.943][error][ERROR] Invalid two factor provider
[2026-04-14 15:52:29.943][response][INFO] (login) POST /identity/connect/token => 400 Bad Request
```
### Screenshots or Videos
_No response_
### Additional Context
My clients got logged out and wanted 2FA validation again, I suspect because of the 2FA troubles in recent releases. However, I use the bitwarden android app for my vaultwarden TOTP (yes, I know). I'd always planned to use the recovery code for a situation like this, but now it's not working.
GiteaMirror
added the bug label 2026-04-20 15:02:21 -05:00
Are you 100% sure you are running 1.35.7?
Could you provide the support string as requested?
I tested this yesterday before releasing the .7.
<!-- gh-comment-id:4245364188 -->
@BlackDex commented on GitHub (Apr 14, 2026):
Are you 100% sure you are running 1.35.7?
Could you provide the support string as requested?
I tested this yesterday before releasing the .7.
I found a device that still has a session and put it into airplane mode just in case; however, when trying to use the TOTP code from that, I get a toast saying "invalid verification code". I suspect maybe it's got into some state where it did clear the authenticator but not fully process that?
Here's the support string:
Your environment (Generated via diagnostics page)
Vaultwarden version: v1.35.7
Web-vault version: v2026.2.0
OS/Arch: linux/x86_64
Running within a container: true (Base: Alpine)
Database type: PostgreSQL
Database version: PostgreSQL 14.18 (Debian 14.18-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
I just found that 2FA can be disabled from the admin panel, so I did that and that worked fine; I can log in properly now. I realised slightly too late that that may have destroyed some state that'd be useful for troubleshooting/bug-hunting, sorry.
<!-- gh-comment-id:4245413677 -->
@bo0tzz commented on GitHub (Apr 14, 2026):
I just found that 2FA can be disabled from the admin panel, so I did that and that worked fine; I can log in properly now. I realised slightly too late that that may have destroyed some state that'd be useful for troubleshooting/bug-hunting, sorry.
If you can provide which 2FA's you had enabled we might be able to reproduce, but again, i tested it yesterday and it removed my configured 2FA's.
<!-- gh-comment-id:4245426810 -->
@BlackDex commented on GitHub (Apr 14, 2026):
If you can provide which 2FA's you had enabled we might be able to reproduce, but again, i tested it yesterday and it removed my configured 2FA's.
@fblz So, your recovery token didn't cleared all 2FA's?
And are you able to use that token twice or more, even after the first try?
What do the logs report?
<!-- gh-comment-id:4247653628 -->
@BlackDex commented on GitHub (Apr 14, 2026):
@fblz So, your recovery token didn't cleared all 2FA's?
And are you able to use that token twice or more, even after the first try?
What do the logs report?
I can enter the token multiple times on /#/recover-2fa.
The following line is logged when I try:
Apr 15 00:44:44 vaultwarden[47849]: [2026-04-15 00:44:44.240][error][ERROR] Invalid two factor provider
I'll have a look at increasing log level.
<!-- gh-comment-id:4247681745 -->
@fblz commented on GitHub (Apr 14, 2026):
I can enter the token multiple times on `/#/recover-2fa`.
The following line is logged when I try:
```
Apr 15 00:44:44 vaultwarden[47849]: [2026-04-15 00:44:44.240][error][ERROR] Invalid two factor provider
```
I'll have a look at increasing log level.
I can keep the situation as is for the next ~10h. After that I need to reset the 2FA from the admin panel. If you want to test something on my side, let me know.
<!-- gh-comment-id:4248404829 -->
@fblz commented on GitHub (Apr 15, 2026):
I can keep the situation as is for the next ~10h. After that I need to reset the 2FA from the admin panel. If you want to test something on my side, let me know.
I would need to have the logs during the attempt to use the 2fa-recovery.
If possible with debug log level to get a bit more details maybe.
Because, does it report that the recovery code is invalid, or does it report it is valid, but then does not remove all 2FA's?
<!-- gh-comment-id:4250065789 -->
@BlackDex commented on GitHub (Apr 15, 2026):
I would need to have the logs during the attempt to use the 2fa-recovery.
If possible with debug log level to get a bit more details maybe.
Because, does it report that the recovery code is invalid, or does it report it is valid, but then does not remove all 2FA's?
<!-- gh-comment-id:4250096121 -->
@stefan0xC commented on GitHub (Apr 15, 2026):
It fails before because the selected id (8) is not in the list of twofactor_ids https://github.com/dani-garcia/vaultwarden/blob/e7e4b9a86d4effaadd67e3465d36100d47d0f073/src/api/identity.rs#L764-L769
But, how did it worked for me than after this change?
Very strange.
But, we can't add it either, that will break Android.
<!-- gh-comment-id:4250193195 -->
@BlackDex commented on GitHub (Apr 15, 2026):
But, how did it worked for me than after this change?
Very strange.
But, we can't add it either, that will break Android.
But, we can't add it either, that will break Android.
We could make an exception for the check if it is the Recover Code? Or does this break too?
<!-- gh-comment-id:4250303197 -->
@stefan0xC commented on GitHub (Apr 15, 2026):
> But, we can't add it either, that will break Android.
We could make an exception for the check if it is the Recover Code? Or does this break too?
That PR to filter those items made it too complex hehe.
Apparently there were more items depending on these checks/values.
<!-- gh-comment-id:4250534726 -->
@BlackDex commented on GitHub (Apr 15, 2026):
That PR to filter those items made it too complex hehe.
Apparently there were more items depending on these checks/values.
I would need to have the logs during the attempt to use the 2fa-recovery. If possible with debug log level to get a bit more details maybe.
What I posted above are said logs with log level debug 🤔
I am fine with trying a special debug build, if that helps.
<!-- gh-comment-id:4250569642 -->
@fblz commented on GitHub (Apr 15, 2026):
> I would need to have the logs during the attempt to use the 2fa-recovery. If possible with debug log level to get a bit more details maybe.
What I posted above are said logs with log level debug 🤔
I am fine with trying a special debug build, if that helps.
@fblz no need for special builds, all can be configured already. Just set LOG_LEVEL=debug as env
<!-- gh-comment-id:4250983942 -->
@BlackDex commented on GitHub (Apr 15, 2026):
@fblz no need for special builds, all can be configured already. Just set `LOG_LEVEL=debug` as env
@BlackDex already did.
--> https://github.com/dani-garcia/vaultwarden/issues/7096#issuecomment-4247741487
This is all log output beginning after loading the /#/recover-2fa site (i.e. HTML loaded but nothing entered into the forms), until after the two in-browser toasts saying Two-step login turned off on your account., You have been logged in!.
<!-- gh-comment-id:4251112821 -->
@fblz commented on GitHub (Apr 15, 2026):
@BlackDex already did.
--> https://github.com/dani-garcia/vaultwarden/issues/7096#issuecomment-4247741487
This is all log output beginning after loading the `/#/recover-2fa` site (i.e. HTML loaded but nothing entered into the forms), until after the two in-browser toasts saying `Two-step login turned off on your account.`, `You have been logged in!`.
Before we release a new version, would someone be so kind to test and verify the :testing tagged container image?
<!-- gh-comment-id:4255080564 -->
@BlackDex commented on GitHub (Apr 15, 2026):
Before we release a new version, would someone be so kind to test and verify the `:testing` tagged container image?
Before we release a new version, would someone be so kind to test and verify the :testing tagged container image?
I used testing-alpine and it worked fine, to rule out any errors I tried with the latest image before that and it did indeed fail.
I had totp only enabled
Thanks for fixing!
<!-- gh-comment-id:4260511298 -->
@FSaurenbach commented on GitHub (Apr 16, 2026):
> Before we release a new version, would someone be so kind to test and verify the `:testing` tagged container image?
I used testing-alpine and it worked fine, to rule out any errors I tried with the latest image before that and it did indeed fail.
I had totp only enabled
Thanks for fixing!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @bo0tzz on GitHub (Apr 14, 2026).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/7096
Prerequisites
Vaultwarden Support String
(admin panel disabled, I can figure this out if it's needed)
Vaultwarden Build Version
docker.io/vaultwarden/server:1.35.7-alpine
Deployment method
Official Container Image
Custom deployment method
No response
Reverse Proxy
ingress-nginx 1.15.1
Host/Server Operating System
Linux
Operating System Version
Kubernetes
Clients
Android, Web Vault, Browser Extension
Client Version
web 2026.2.0
Steps To Reproduce
" Two-step login turned off on your account.
You have been logged in! "
Expected Result
2FA gets reset, I'm able to log in
Actual Result
400 bad request:
Logs
Screenshots or Videos
No response
Additional Context
My clients got logged out and wanted 2FA validation again, I suspect because of the 2FA troubles in recent releases. However, I use the bitwarden android app for my vaultwarden TOTP (yes, I know). I'd always planned to use the recovery code for a situation like this, but now it's not working.
@BlackDex commented on GitHub (Apr 14, 2026):
Are you 100% sure you are running 1.35.7?
Could you provide the support string as requested?
I tested this yesterday before releasing the .7.
@bo0tzz commented on GitHub (Apr 14, 2026):
I found a device that still has a session and put it into airplane mode just in case; however, when trying to use the TOTP code from that, I get a toast saying "invalid verification code". I suspect maybe it's got into some state where it did clear the authenticator but not fully process that?
Here's the support string:
Your environment (Generated via diagnostics page)
Config & Details (Generated via diagnostics page)
Show Config & Details
Config:
@bo0tzz commented on GitHub (Apr 14, 2026):
I just found that 2FA can be disabled from the admin panel, so I did that and that worked fine; I can log in properly now. I realised slightly too late that that may have destroyed some state that'd be useful for troubleshooting/bug-hunting, sorry.
@BlackDex commented on GitHub (Apr 14, 2026):
If you can provide which 2FA's you had enabled we might be able to reproduce, but again, i tested it yesterday and it removed my configured 2FA's.
@bo0tzz commented on GitHub (Apr 14, 2026):
I was using just TOTP/authenticator app.
@BlackDex commented on GitHub (Apr 14, 2026):
I tested that, and email and webauthn.
@fblz commented on GitHub (Apr 14, 2026):
I am having the exact same issue with TOTP right now.
However I did not yet clear the 2FA from the admin panel.
Your environment (Generated via diagnostics page)
Config & Details (Generated via diagnostics page)
Show Config & Details
Config:
@BlackDex commented on GitHub (Apr 14, 2026):
@fblz So, your recovery token didn't cleared all 2FA's?
And are you able to use that token twice or more, even after the first try?
What do the logs report?
@fblz commented on GitHub (Apr 14, 2026):
I can enter the token multiple times on
/#/recover-2fa.The following line is logged when I try:
I'll have a look at increasing log level.
@fblz commented on GitHub (Apr 14, 2026):
@BlackDex with log level debug:
Response for the post to
/identity/connect/token:@fblz commented on GitHub (Apr 15, 2026):
I can keep the situation as is for the next ~10h. After that I need to reset the 2FA from the admin panel. If you want to test something on my side, let me know.
@BlackDex commented on GitHub (Apr 15, 2026):
I would need to have the logs during the attempt to use the 2fa-recovery.
If possible with debug log level to get a bit more details maybe.
Because, does it report that the recovery code is invalid, or does it report it is valid, but then does not remove all 2FA's?
@stefan0xC commented on GitHub (Apr 15, 2026):
It fails before because the selected id (8) is not in the list of twofactor_ids https://github.com/dani-garcia/vaultwarden/blob/e7e4b9a86d4effaadd67e3465d36100d47d0f073/src/api/identity.rs#L764-L769
@BlackDex commented on GitHub (Apr 15, 2026):
But, how did it worked for me than after this change?
Very strange.
But, we can't add it either, that will break Android.
@stefan0xC commented on GitHub (Apr 15, 2026):
We could make an exception for the check if it is the Recover Code? Or does this break too?
@BlackDex commented on GitHub (Apr 15, 2026):
That PR to filter those items made it too complex hehe.
Apparently there were more items depending on these checks/values.
@fblz commented on GitHub (Apr 15, 2026):
What I posted above are said logs with log level debug 🤔
I am fine with trying a special debug build, if that helps.
@BlackDex commented on GitHub (Apr 15, 2026):
@fblz no need for special builds, all can be configured already. Just set
LOG_LEVEL=debugas env@fblz commented on GitHub (Apr 15, 2026):
@BlackDex already did.
--> https://github.com/dani-garcia/vaultwarden/issues/7096#issuecomment-4247741487
This is all log output beginning after loading the
/#/recover-2fasite (i.e. HTML loaded but nothing entered into the forms), until after the two in-browser toasts sayingTwo-step login turned off on your account.,You have been logged in!.@BlackDex commented on GitHub (Apr 15, 2026):
I have it fixed now.. for real this time.
@BlackDex commented on GitHub (Apr 15, 2026):
Before we release a new version, would someone be so kind to test and verify the
:testingtagged container image?@FSaurenbach commented on GitHub (Apr 16, 2026):
I used testing-alpine and it worked fine, to rule out any errors I tried with the latest image before that and it did indeed fail.
I had totp only enabled
Thanks for fixing!