[GH-ISSUE #298] Cannot log in from Android when 2FA is enabled #158

Closed
opened 2026-03-03 01:26:00 +03:00 by kerem · 5 comments
Owner

Originally created by @aksdb on GitHub (Dec 16, 2018).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/298

In the current version of bitwarden_rs, I can no longer login with the Bitwarden Android client with accounts that have 2FA enabled. The app immediately closes.
Since my Android development setup is still kinda sucky (or I suck at using it :-)) the only thing I got out of the debugger was "System.InvalidOperationException: Token not found." without a proper stacktrace.
I presume something in the response is missing. Or maybe simply the casing of the key(s) is different? Apparently it works in the jslib implementation, so it has to be something that the C# implementation of the mobile apps does differently.

Originally created by @aksdb on GitHub (Dec 16, 2018). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/298 In the current version of bitwarden_rs, I can no longer login with the Bitwarden Android client with accounts that have 2FA enabled. The app immediately closes. Since my Android development setup is still kinda sucky (or I suck at using it :-)) the only thing I got out of the debugger was "System.InvalidOperationException: Token not found." without a proper stacktrace. I presume something in the response is missing. Or maybe simply the casing of the key(s) is different? Apparently it works in the jslib implementation, so it has to be something that the C# implementation of the mobile apps does differently.
kerem closed this issue 2026-03-03 01:26:00 +03:00
Author
Owner

@tycho commented on GitHub (Dec 16, 2018):

I've run into this as well. The log for bitwarden_rs claims the login attempt succeeded, but the Android app really didn't like whatever response bitwarden_rs gave.

<!-- gh-comment-id:447666159 --> @tycho commented on GitHub (Dec 16, 2018): I've run into this as well. The log for bitwarden_rs claims the login attempt succeeded, but the Android app really didn't like whatever response bitwarden_rs gave.
Author
Owner

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

You were right, it was because of a casing issue. That was solved some time ago for the JSON API. But the login is a normal form instead. It should be fixed now in the latest master, tested on iOS.

<!-- gh-comment-id:447667348 --> @dani-garcia commented on GitHub (Dec 16, 2018): You were right, it was because of a casing issue. That was solved some time ago for the JSON API. But the login is a normal form instead. It should be fixed now in the latest master, tested on iOS.
Author
Owner

@mprasil commented on GitHub (Dec 16, 2018):

Image from master is now building. Give it about an hour.

<!-- gh-comment-id:447669909 --> @mprasil commented on GitHub (Dec 16, 2018): Image from master [is now building](https://cloud.docker.com/repository/registry-1.docker.io/mprasil/bitwarden/builds/3f994979-c6e9-4cac-9195-14a15ec813d2). Give it about an hour.
Author
Owner

@tycho commented on GitHub (Dec 17, 2018):

@dani-garcia Confirmed, that fixed it!

<!-- gh-comment-id:447707975 --> @tycho commented on GitHub (Dec 17, 2018): @dani-garcia Confirmed, that fixed it!
Author
Owner

@aksdb commented on GitHub (Dec 17, 2018):

Thanks @dani-garcia (and @mprasil) for getting a fix out that fast. Works fine now :-)

<!-- gh-comment-id:447918258 --> @aksdb commented on GitHub (Dec 17, 2018): Thanks @dani-garcia (and @mprasil) for getting a fix out that fast. Works fine now :-)
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#158
No description provided.