[GH-ISSUE #604] Android app generating invalid codes for Microsoft accounts (2FA) #6856

Closed
opened 2026-04-10 23:12:53 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @ghost on GitHub (Sep 23, 2019).
Original GitHub issue: https://github.com/bitwarden/android/issues/604

Hi there,

My Android app is generating invalid codes for Microsoft 2FA. I noticed the QRCode gives an URI of sorts (for Microsoft Authenticator?). I tried adding the 2FA code generated on the web vault and it works flawlessly, but the codes generated by the mobile app are always invalid.

Device: Galaxy Note 9
Android: 9.0 Pie - September Security Release
Language: English (Same as desktop.)
Date and Time: GMT -3 (Recife Timezone - Same as desktop.)
Tried reinstalling? Yes.
Rebooted device? Yes.
Installed from Play Store.
Version: 2.2.2
Error on Device App: None.

Originally created by @ghost on GitHub (Sep 23, 2019). Original GitHub issue: https://github.com/bitwarden/android/issues/604 Hi there, My Android app is generating invalid codes for Microsoft 2FA. I noticed the QRCode gives an URI of sorts (for Microsoft Authenticator?). I tried adding the 2FA code generated on the web vault and it works flawlessly, but the codes generated by the mobile app are always invalid. Device: Galaxy Note 9 Android: 9.0 Pie - September Security Release Language: English (Same as desktop.) Date and Time: GMT -3 (Recife Timezone - Same as desktop.) Tried reinstalling? Yes. Rebooted device? Yes. Installed from Play Store. Version: 2.2.2 Error on Device App: None.
Author
Owner

@kspearrin commented on GitHub (Sep 23, 2019):

Is your system time incorrect on your mobile device?

<!-- gh-comment-id:534071031 --> @kspearrin commented on GitHub (Sep 23, 2019): Is your system time incorrect on your mobile device?
Author
Owner

@ghost commented on GitHub (Sep 23, 2019):

Is your system time incorrect on your mobile device?

@kspearrin Nope. I mentioned in the post, both my computer and PC are synchronized to the GMT -3 timezone through NTP servers. I don't/didn't fiddle with those settings, and both times match down to the second.

<!-- gh-comment-id:534320105 --> @ghost commented on GitHub (Sep 23, 2019): > Is your system time incorrect on your mobile device? @kspearrin Nope. I mentioned in the post, both my computer and PC are synchronized to the GMT -3 timezone through NTP servers. I don't/didn't fiddle with those settings, and both times match down to the second.
Author
Owner

@kspearrin commented on GitHub (Sep 24, 2019):

Can you share what your TOTP key value looks like? Is it just a base 32 string or a URI?

<!-- gh-comment-id:534359346 --> @kspearrin commented on GitHub (Sep 24, 2019): Can you share what your TOTP key value looks like? Is it just a base 32 string or a URI?
Author
Owner

@ghost commented on GitHub (Sep 24, 2019):

It's in this format: xxxx xxxx xxxx xxxx

Same one on web generates a valid code, on mobile does not.

If I scan the qrcode on MS website it generates an URI but containing this string in it. I can't get the exact URI right now (not near a computer right now, but will do tomorrow morning).

<!-- gh-comment-id:534369932 --> @ghost commented on GitHub (Sep 24, 2019): It's in this format: xxxx xxxx xxxx xxxx Same one on web generates a valid code, on mobile does not. If I scan the qrcode on MS website it generates an URI but containing this string in it. I can't get the exact URI right now (not near a computer right now, but will do tomorrow morning).
Author
Owner

@kspearrin commented on GitHub (Sep 24, 2019):

Does it work correctly if you remove the spaces?

<!-- gh-comment-id:534567538 --> @kspearrin commented on GitHub (Sep 24, 2019): Does it work correctly if you remove the spaces?
Author
Owner

@ghost commented on GitHub (Sep 25, 2019):

An update... I went to the vault on my browser on my phone. And the codes generated were also invalid.

I tried installing the app on my work device (Moto G5 Play) and it worked. I went ahead and wiped my personal device... And it works. I don't know what Samsung broke, but they screwed something in there.

Closing the issue since it's an issue with how Samsung handles date and time apparently. Solution: Sync time manually and reboot bitwarden, if it doesn't work, wipe your device and try again.

<!-- gh-comment-id:534827481 --> @ghost commented on GitHub (Sep 25, 2019): An update... I went to the vault on my browser on my phone. And the codes generated were also invalid. I tried installing the app on my work device (Moto G5 Play) and it worked. I went ahead and wiped my personal device... And it works. I don't know what Samsung broke, but they screwed something in there. Closing the issue since it's an issue with how Samsung handles date and time apparently. Solution: Sync time manually and reboot bitwarden, if it doesn't work, wipe your device and try again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#6856