[GH-ISSUE #4799] Can't login, unable to authenticate yubikey: "An error has occurred. Two-step token is invalid. Try again." #102238

Closed
opened 2026-06-03 01:36:40 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @Opening-Button-8988 on GitHub (Feb 27, 2025).
Original GitHub issue: https://github.com/bitwarden/android/issues/4799

Steps To Reproduce

  1. Insert yubikey via USB-C.
  2. Open the app
  3. Enter email address and password. "Login with master password"
  4. Page opens "Authenticate WebAuthn...Continue to complete WebAuthn verification".
  5. Click "Launch WebAuthn"
  6. Default browser opens vault.bitwarden.com with FIDO2 WebAuthn. Click "Authenticate WebAuthn".
  7. Google Passkeys prompt opens. It says "There aren't any passkeys for vault.bitwarden.com on this device" (this is expected). Click "Use a different device".
  8. If yubikey is connected in the USB-C port, simply touch the yubikey. Otherwise click "NFC security key" and touch the back of the phone with yubikey.
  9. I get switched back to the app, error: "An error has occurred. Two-step token is invalid. Try again."

Expected Result

I expect to be logged in as soon as I authenticate with my yubikey.

Actual Result

Error "An error has occurred. Two-step token is invalid. Try again."

Screenshots or Videos

No response

Additional Context

Issue occurs with F-Droid and Google Playstore (via Aurora Store) builds, and with Vanadium browser and Brave browser. Javascript JIT is enabled.

I'm able to login using the same yubikey on desktop.

Passkey integration over the last few years has negatively impacted the flow for hardware keys. It used to be possible to login with your hardware keys without the Google stack being involved at all - I didn't need to even install Google Services Framework. But ever since Passkeys were introduced, I've experienced nothing but problems when using my hardware keys, more especially on Android but desktop too.

I looked at similar issues on the bitwarden community forum. My phone's time is synced properly, I've rebooted my phone, and no other devices are logged into my account. None of my yubikeys are marked "Migrated from FIDO" under Settings → Security → Two-step login → FIDO2 WebAuthn → “Manage”. I last successfully logged into Bitwarden with this phone in June 2024 (I rarely login to this account).

Build Version

2025.1.2

What server are you connecting to?

US

Self-host Server Version

No response

Environment Details

Pixel 7, Android 15.
GrapheneOS build 2025021100 using secondary profile.

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
Originally created by @Opening-Button-8988 on GitHub (Feb 27, 2025). Original GitHub issue: https://github.com/bitwarden/android/issues/4799 ### Steps To Reproduce 1. Insert yubikey via USB-C. 2. Open the app 3. Enter email address and password. "Login with master password" 4. Page opens "Authenticate WebAuthn...Continue to complete WebAuthn verification". 5. Click "Launch WebAuthn" 6. Default browser opens vault.bitwarden.com with FIDO2 WebAuthn. Click "Authenticate WebAuthn". 7. Google Passkeys prompt opens. It says "There aren't any passkeys for vault.bitwarden.com on this device" (this is expected). Click "Use a different device". 8. If yubikey is connected in the USB-C port, simply touch the yubikey. Otherwise click "NFC security key" and touch the back of the phone with yubikey. 9. I get switched back to the app, error: "An error has occurred. Two-step token is invalid. Try again." ### Expected Result I expect to be logged in as soon as I authenticate with my yubikey. ### Actual Result Error "An error has occurred. Two-step token is invalid. Try again." ### Screenshots or Videos _No response_ ### Additional Context Issue occurs with F-Droid and Google Playstore (via Aurora Store) builds, and with Vanadium browser and Brave browser. Javascript JIT is enabled. I'm able to login using the same yubikey on desktop. Passkey integration over the last few years has negatively impacted the flow for hardware keys. It used to be possible to login with your hardware keys without the Google stack being involved at all - I didn't need to even install Google Services Framework. But ever since Passkeys were introduced, I've experienced nothing but problems when using my hardware keys, more especially on Android but desktop too. I looked at similar issues on the bitwarden community forum. My phone's time is synced properly, I've rebooted my phone, and no other devices are logged into my account. None of my yubikeys are marked "Migrated from FIDO" under Settings → Security → Two-step login → FIDO2 WebAuthn → “Manage”. I last successfully logged into Bitwarden with this phone in June 2024 (I rarely login to this account). ### Build Version 2025.1.2 ### What server are you connecting to? US ### Self-host Server Version _No response_ ### Environment Details Pixel 7, Android 15. GrapheneOS build 2025021100 using secondary profile. ### Issue Tracking Info - [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
GiteaMirror added the bugapp:password-manager labels 2026-06-03 01:36:40 -05:00
Author
Owner

@bitwarden-bot commented on GitHub (Feb 27, 2025):

Thank you for your report! We've added this to our internal board for review.
ID: PM-18695

<!-- gh-comment-id:2687914147 --> @bitwarden-bot commented on GitHub (Feb 27, 2025): Thank you for your report! We've added this to our internal board for review. ID: PM-18695
Author
Owner

@jvroutak commented on GitHub (Mar 3, 2025):

I seem to have nearly identical issue:

Background:

  • Bitwarden on Android working fine for years
  • Android app version 2025.1.2, installed via Play Store
  • Samsung S22 (Android 14, last updated February 22, security level 1. Feb 2025)
  • 2FA with Yubikey
  • US server

Steps:

  • An application tries to authenticate using passkey in Bitwarden (https://play.google.com/store/apps/details?id=fi.kansalliskirjasto.ekirjasto&hl=fi for what it's worth). This has worked earlier.
  • Passkey authentication fails
  • I'm forced to log into Bitwarden app again (which is unusual as there hasn't been an update)
  • Login fails with similar (but not identical) error: 'Tapahtui virhe. Pyyntöäsi ei voitu käsitellä. Yritä uudelleen tai ota meihin yhteyttä' (translates to 'An error occurred. Your request could not be processed. Try again or contact us'.
  • After this, I can't log in to the app
  • Retried many times, one time got as far as authenticating with Yubikey NFC, but that failed too even though the Yubikey flow seemed to work
  • Clearing app cache didn't help
  • Clearing app local storage didn't help
  • Reinstalling app didn't help
  • Reboot didn't help

Remarks:

  • Logging into clean web browser extension works fine (using the same Yubikey)
<!-- gh-comment-id:2693555343 --> @jvroutak commented on GitHub (Mar 3, 2025): I seem to have nearly identical issue: Background: - Bitwarden on Android working fine for years - Android app version 2025.1.2, installed via Play Store - Samsung S22 (Android 14, last updated February 22, security level 1. Feb 2025) - 2FA with Yubikey - US server Steps: - An application tries to authenticate using passkey in Bitwarden (https://play.google.com/store/apps/details?id=fi.kansalliskirjasto.ekirjasto&hl=fi for what it's worth). This has worked earlier. - Passkey authentication fails - I'm forced to log into Bitwarden app again (which is unusual as there hasn't been an update) - Login fails with similar (but not identical) error: 'Tapahtui virhe. Pyyntöäsi ei voitu käsitellä. Yritä uudelleen tai ota meihin yhteyttä' (translates to 'An error occurred. Your request could not be processed. Try again or contact us'. - After this, I can't log in to the app - Retried many times, one time got as far as authenticating with Yubikey NFC, but that failed too even though the Yubikey flow seemed to work - Clearing app cache didn't help - Clearing app local storage didn't help - Reinstalling app didn't help - Reboot didn't help Remarks: - Logging into clean web browser extension works fine (using the same Yubikey)
Author
Owner

@jvroutak commented on GitHub (Mar 3, 2025):

Update: Problem seems to have resolved by itself after waiting a few hours.

<!-- gh-comment-id:2694305998 --> @jvroutak commented on GitHub (Mar 3, 2025): Update: Problem seems to have resolved by itself after waiting a few hours.
Author
Owner

@closebot-bw commented on GitHub (Nov 18, 2025):

⚠️ Stale Issue Notice

This issue has been automatically marked as stale due to inactivity. It will be closed in 2 weeks (December 02, 2025) if no further activity occurs.

If this issue is still relevant and you would like to keep it open, please:

  • Comment on this issue to show continued interest
  • Provide any additional information or updates
  • Confirm that the issue still exists in the latest version

Thank you for your contribution to this project! 🙏

<!-- gh-comment-id:3548195695 --> @closebot-bw commented on GitHub (Nov 18, 2025): ⚠️ **Stale Issue Notice** This issue has been automatically marked as stale due to inactivity. It will be closed in **2 weeks** (December 02, 2025) if no further activity occurs. If this issue is still relevant and you would like to keep it open, please: - Comment on this issue to show continued interest - Provide any additional information or updates - Confirm that the issue still exists in the latest version Thank you for your contribution to this project! 🙏
Author
Owner

@Opening-Button-8988 commented on GitHub (Nov 25, 2025):

Update: This issue no longer occurs for me on v2025.8.1. However, after authenticating with my yubikey, the app gets stuck on the loading screen for a while (say 20 seconds) but eventually I am able to log in.

<!-- gh-comment-id:3573818287 --> @Opening-Button-8988 commented on GitHub (Nov 25, 2025): Update: This issue no longer occurs for me on v2025.8.1. However, after authenticating with my yubikey, the app gets stuck on the loading screen for a while (say 20 seconds) but eventually I am able to log in.
Author
Owner

@mpbw2 commented on GitHub (Dec 4, 2025):

Update: This issue no longer occurs for me on v2025.8.1. However, after authenticating with my yubikey, the app gets stuck on the loading screen for a while (say 20 seconds) but eventually I am able to log in.

Hi @Opening-Button-8988 , if this delay is still happening with 2025.11.x, please create a new issue since the original issue is no longer occurring.

<!-- gh-comment-id:3612869059 --> @mpbw2 commented on GitHub (Dec 4, 2025): > Update: This issue no longer occurs for me on v2025.8.1. However, after authenticating with my yubikey, the app gets stuck on the loading screen for a while (say 20 seconds) but eventually I am able to log in. Hi @Opening-Button-8988 , if this delay is still happening with 2025.11.x, please create a new issue since the original issue is no longer occurring.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#102238