Cannot log in from Android when 2FA is enabled #2256

Closed
opened 2025-10-09 17:53:42 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @aksdb on GitHub.

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. 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.
Author
Owner

@aksdb commented on GitHub:

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

@aksdb commented on GitHub: Thanks @dani-garcia (and @mprasil) for getting a fix out that fast. Works fine now :-)
Author
Owner

@tycho commented on GitHub:

@dani-garcia Confirmed, that fixed it!

@tycho commented on GitHub: @dani-garcia Confirmed, that fixed it!
Author
Owner

@mprasil commented on GitHub:

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

@mprasil commented on GitHub: 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:

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.

@tycho commented on GitHub: 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:

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.

@dani-garcia commented on GitHub: 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2256