mirror of
https://github.com/bitwarden/android.git
synced 2026-03-13 21:54:17 -05:00
FIDO2 in Android app is not working #1363
Closed
opened 2025-11-26 22:46:12 -06:00 by GiteaMirror
·
35 comments
No Branch/Tag Specified
main
pm-33356/policy-changed-push-sync
premium-upgrade/PM-33508-billing-api-service
PM-30130-remove-archive-feature-flag
sdlc/sdk-update
tooling/improve-review-workflow
PM-32663/update-vault-migration-screens
llm/add-resolving-sdk-updates-skill
QA-1523/sanity-test-saucelabs
release/2026.3-rc48
PM-24380/flight-recorder-redact-hostname
PM-26577-app-links-support
PM-26896-autofill-fix
release/2026.2-rc47
PM-32714/fallback-to-web-vault-host
pr-6572
PM-28834/setting-app-layout-horizonos
vvolkgang/process-release-notes-v2
release/2026.2-rc46
release/2026.1-rc45
PM-30644/added-logs-for-debug
PM-30644/quicktile-nav-not-showing-migration
minor-gradle-updates
release/2026.1-rc42
release/2026.1-rc44
release/2026.1-rc43
PM-28834/set-landscape-on-horizonos-devices
context-rules
devclarity/update-code-review-command
PM-20026/force-ltr-passwords-and-codes
release/2025.12-rc41
cmcg/testCoverage
claude-skill/creating-feature-flags
PM-29014/talkback-support-for-passwords
release/2025.12-rc40
BRE-1305/publish_test
accept-user-certs
autofill-permissions
release/2025.11-rc39
PM-22479/check-all-certificates-validate-asset-links
release/2025.10-rc38
agalles/android-latest
optimize-test-workflows
tier2-test-sharding
retro-agent
PM-27001/skip-account-selection-only-one-exists-cxp
release/2025.10-rc37
agalles/test-1118
release/2025.10-rc36
PM-20593-token-refresh
QA-1126b/adding-native-sanity-test
release/2025.9-rc35
pm-25933/sdk-update-password
release/2025.9-rc34
release/2025.8-rc33
agalles/20250821-release
debug-release-issues
pm-24249-allow-automated-prs-for-sdk-updates
release/2025.8-rc32
release/WORKFLOW-TEST-2025.8-rc28
agalles/20250807release
release/2025.07-rc25
release/hotfix-v2025.7.0-bwa
pm-23311/export-vault-policy-bypass
release/2025.07-rc24
authenticator-pm-sync-flags-issue
ps/implement-sdk-repository-example
release/hotfix-v2025.6.0-bwpm
release/2025.06-rc21
agalles/automate-android-fastlane-patch
release/2025.05-rc20
release/2025.04-rc19
languages/basque
release/2025.03-rc19
update-readme
qrcode/feature
innovation/archive/pm-19153-archive-items
qrcode/2-ui-fields
qrcode/1-page
hold-on-biometric-prompt-alternative
release-notes-process
release/2025.02-rc16
bwa-monorepo
PM-8223/new-device-verification-ux-improvements
pm-18451/exempt-from-policies
test-bwa
cs-workaround-linked-0-copy
release/2025.01-rc15
release/2025.01-rc14
release/2024.12-rc13
pm-16670/sync-leave-notice
821
PM-16695/backport-lean-more-new-device-verification
km/15084-testing
release/hotfix-v2024.11.7
release/2024.11-rc1
pm-11304/collection-add-item-button
PM-14241/disabling-logs-app-crash
poc/offline-editing
new-version-calc
pm-11649/expired-link-services
pm-6702/add-feature-flag
pm-6702/email-verification-feature
pm-9933/marketing-copy-update
pm-6702/registration-flows
update-templates
pm-6701/email-verification-selfhost-registration
v2026.2.1-bwpm
v2026.2.1-bwa
v2026.2.0-bwpm
v2026.2.0-bwa
v2026.1.1-bwa
v2026.1.1-bwpm
temp-test
v2026.1.0-bwpm
v2026.1.0-bwa
v2025.12.1-bwa
v2025.12.1-bwpm
v2025.12.0-bwa
v2025.12.0-bwpm
v2025.11.1-bwpm
v2025.11.1-bwa
v2025.11.0-bwpm
v2025.11.0-bwa
v2025.10.1-bwa
v2025.10.1-bwpm
v2025.10.0-bwa
v2025.10.0-bwpm
v2025.9.1-bwa
v2025.9.1-bwpm
v2025.9.0-bwa
v2025.9.0-bwpm
v2025.8.1-bwa
v2025.8.1-bwpm
v2025.8.0-bwa
v2025.8.0-bwpm
v2025.7.2-bwa
v2025.7.2-bwpm
v2025.7.1-bwa
v2025.7.1-bwpm
v2025.7.0-bwa
v2025.7.0-bwpm
v2025.6.1-bwpm
v2025.6.0-bwa
v2025.6.0-bwpm
v2025.1.0-bwa
v2025.5.0-bwa
v2025.5.0-bwpm
v2025.5.999
2025.4.0
v2025.4.0
untagged-4731eaadac73f3dfbbb8
v2025.3.0
v2025.2.0
untagged-815a165c5d70ffe75bc7
v2025.1.2
v2025.1.1
v2025.1.0
v2024.12.0
untagged-5a76b6392a4c8998c63a
v2024.11.7
v2024.11.6
v2024.11.5
v2024.11.4
v2024.11.3
v2024.11.2
v2024.11.1
v2024.11.0
v2024.10.2
v2024.10.1
v2024.10.0
v2024.9.0
v2024.8.1
v2024.8.0
v2024.7.3
v2024.7.2
v2024.7.1
v2024.7.0
v2024.6.1
v2024.6.0
v2024.5.1
v2024.4.1
v2024.4.2
v2024.4.0
v2024.3.3
v2024.3.1
v2024.3.0
v2024.2.1
v2024.2.0
v2024.1.1
v2024.1.0
v2023.12.0
v2023.10.0
v2023.9.2
maui-single-project-android
v2023.9.1
v2023.9.0
v2023.8.0
v2023.7.0
v2023.5.0
v2023.4.0
v2023.3.2
v2023.3.1
v2023.3.0
v2023.2.0
v2023.1.0
v2022.11.0
v2022.10.0
v2022.9.1
v2022.9.0
v2022.8.0
v2022.6.2
v2022.6.1
v2022.6.0
v2022.05.0
v2.18.0
v2.17.0
v2.16.4
v2.16.3
v2.16.2
v2.16.1
v2.15.0
v2.14.2
v2.14.1
v2.14.0
v2.13.0
v2.12.0
v2.11.3
v2.11.2
v2.11.1
v2.11.0
v2.10.0
v2.9.1
v2.9.0
v2.8.2
v2.8.1
v2.8.0
v2.7.2
v2.7.0
v2.6.1
v2.6.0
v2.5.6
v.2.5.5
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.1
v2.5.0
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.1
v2.3.0
v2.2.8
v2.2.7
v2.2.6
v2.2.2
v2.2.1
v2.2.0
v2.1.2
v2.1.0
v2.0.6
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v2.0.0
v1.22.1
v1.22.0
v1.21.0
v1.20.0
v1.19.0
v1.18.1
v1.18.0
v1.17.0
v1.16.0
v1.15.2
v1.15.1
v1.15.0
v1.14.4
v1.14.1
v1.14.0
v1.13.0
v1.12.2
v1.12.1
v1.12.0
v1.11.1
v1.11.0
v1.10.0
v1.9.0
v1.8.1
v1.8.0
v1.7.0
v1.6.5
v1.6.1
v1.6.0
v1.5.1
v1.5.0
v1.4.4
v1.4.3
v1.4.0
v1.3.0
v1.2.1
v1.2.0
v1.1.0
v1.0.0
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/android#1363
Reference in New Issue
Block a user
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.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @numeratorjik on GitHub (Oct 18, 2021).
Steps To Reproduce
Version 2.13.0 of Android app. Installed on Google Pixel 5 running current Android 12 beta. The app now prompts me for YubiKey login but it doesn't work. First I see this:
I tap "Authenticate WebAuthn" and I see this:
I tap "GET STARTED" and I see this:
When I hold my key up to the back of the phone, the app switches back to the screen shown in the first screenshot above and this page opens in my browser:
Other apps on my phone that use WebAuthn work just fine with my YubiKey. I am able to authenticate to Bitwarden with my YubiKey in my browser on the desktop.
Expected Result
I expect the app to authenticate successfully with my YubiKey.
Actual Result
It's not working.
Screenshots or Videos
See above.
Additional Context
No response
Operating System
Android
Operating System Version
Android 12 beta
Device
Pixel 5
Build Version
2.13.0
Beta
@mpbw2 commented on GitHub (Oct 18, 2021):
You have to disable your YubiKey's OTP-over-NFC option. Check out the "Troubleshooting YubiKey NFC" section from our help page at https://bitwarden.com/help/article/setup-two-step-login-fido/
@numeratorjik commented on GitHub (Oct 18, 2021):
That may be a workaround, but like I said, other apps which I authenticate to using my YubiKey work just fine over NFC on my phone, so even if there is a workaround then it would seem that there is something wrong with the Bitwarden implementation of this.
@numeratorjik commented on GitHub (Oct 18, 2021):
Furthermore, when I run Yubikey Manager on macOS and insert my Yubikey NEO and go to the Interfaces screen, it does not show NFC interfaces, so apparently I can't disable OTP over NFC for my Yubikey.
Y'all need to rethink something here.
@numeratorjik commented on GitHub (Oct 18, 2021):
Please reopen this issue until you have figured out how to make WebAuthn work on Android for Yubikey NEO users.
@mpbw2 commented on GitHub (Oct 18, 2021):
@numeratorjik I agree it's not ideal, but I was unable to find a way to prevent Android's default NDEF scan behavior during my time working on this feature. Can you provide some examples of apps that are able to do it? I'm happy to look into it if it's possible.
@numeratorjik commented on GitHub (Oct 18, 2021):
1Password, for one. Also Google itself.
The problem isn't so much that scanning my YubiKey loads the Yubico demo OTP page; that happens with 1Password too. The problem is that however apps like 1Password are doing things enables them to complete the FIDO2 / WebAuthn authentication before the demo OTP page is loaded, whereas the Bitwarden app doesn't.
@mpbw2 commented on GitHub (Oct 18, 2021):
Reopening to continue research into handling secondary scan.
@mderazon commented on GitHub (Oct 19, 2021):
@mportune-bw in response to https://community.bitwarden.com/t/u2f-support-over-nfc/611/53?u=miked
I am not sure my problem is the same, I have a fido u2f key (non yubikey) that generally work with webauthn everywhere (and has NFC)
I am going through the same flow, getting the OS screen (Choose how to use your security key) and after I authenticate, focus goes back to the app and I see a generic error dialog saying
I would be happy to record the flow, but Bitwarden has screen capturing protection and can't find a way to disable it
Might be related
https://github.com/bitwarden/clients/issues/2803
@project-eutopia commented on GitHub (Oct 28, 2021):
I have this same problem as well. I tried disabling OTP over NFC (
ykman config nfc --disable OTP), confirmed it was disabled using theykman infocommand, and then tried authenticating with my Yubikey over NFC on Android but still get the same "An error has occurred." dialog. The only difference after disabling OTP is that now it doesn't immediately try to open a browser after I tap my Yubikey to my phone for NFC. I am on Android 12, and the newest Android version of Bitwarden 2.14.0.@mpbw2 commented on GitHub (Oct 28, 2021):
@project-eutopia That sounds like a different issue. Can you try deleting and re-adding your Yubikey via the web vault settings, then try logging in again on Android?
@project-eutopia commented on GitHub (Oct 28, 2021):
@mportune-bw Thank you for your follow up, that seems to have worked!
@mpbw2 commented on GitHub (Oct 29, 2021):
@mderazon I agree it might be related to that web issue as that particular error is generated from our web connector and returned to the app for display. I'm keeping an eye on it.
@zaneselvans commented on GitHub (Dec 29, 2021):
I'm having what seems like the same issue on a Pixel 5a with a Yubikey NEO. I see now that the ... in the upper right hand corner of the screen offers other 2FA options, including using a Yubikey NEO, rather than getting dumped directly to WebAuthn. These other 2FA options should be much more prominent in the flow somehow -- let folks choose which 2FA method to use explicitly. It took me an hour or more of messing around with this before I figured out there were other options.
@DonRohan commented on GitHub (Jul 13, 2022):
I'm having the same Issue with a Yubikey 5 NFC and a Solokey Type-C. Webauthn doesnt work with the Bitwarden-App. Even after disabling OTP.
@ImprovingRigmarole commented on GitHub (Sep 13, 2022):
I'm having the exact same issue on Android 12, impossible to use a yubikey via FIDO2 (OTP is disabled) :
An error has occurredpopuppress the buttonscreen stays foreverAny update on this ?
@kevinjbeattie commented on GitHub (Sep 29, 2022):
I opened a bug regarding WebView on Android here: https://issuetracker.google.com/issues/249758200
@k3a commented on GitHub (Oct 8, 2022):
It also didn't work for me with Solo NFC key. Additionally there was no option to select a different 2FA like Authenticator. Such option was available while logging in to the Bitwarden web. I had to disable Solo NFC key in account settings to be able to log in from the Android app.
@BrendanxP commented on GitHub (Oct 22, 2022):
I have the exact same issue and I already unchecked OTP. Bought 5 YubiKey's all with NFC, some with USB-C, but not one works properly on Android.
USB makes the light blink for 200ms and it stops thereafter. No matter if I spam the button instantly or wait a little bit, the key is not picked up. Via NFC it tells me that it succeeded, but then nothing happens. And if i click all windows away the login will give an error. Tried clearing everything from the key and reenabling the FIDO2 auth multiple times. I have no idea what is going wrong here.
@Sparticuz commented on GitHub (Feb 1, 2023):
I've got the same problem as @improving-rigmarole. The led blinks quickly, as if it's failing a handshake or something, then I get this error after a number of seconds. Using default chrome as the webview
@RZR7332 commented on GitHub (Feb 2, 2023):
Exact same problem I am facing as well.
@mderazon commented on GitHub (Feb 7, 2023):
Please see this screencast
https://user-images.githubusercontent.com/717076/217385177-a9256b72-9d67-4313-a1f1-3b7824e71749.mp4
Cannot sign in. Unfortunately, Bitwarden has screen capture protection on by default so the flow starts in the video in black screen from the app, where it goes to the browser and back to the app with failure
@Jademalo commented on GitHub (May 29, 2023):
I need to add myself to the voices having problems here, but I think the issue is much bigger than just Bitwarden. Any FIDO2 supporting application is giving me trouble.
To hopefully shed a bit of light on the situation here, after a lot of research and testing it seems that Android's implementation of WebAuthn does not correctly implement CTAP2, and only really implements CTAP1 (U2F).
If the device tries to authenticate with Anrdoid using the FIDO2 CTAP2 protocol, it will fail.
Due to this, Android flat out cannot handle any situation with Discoverable credentials (formerly called Resident credentials), and it cannot request a hardware set PIN. In addition, Android WebView also does not support WebAuthn, and you need to make sure your default browser supports it.
Since Bitwarden's implementation of FIDO2 does not request a pin and can only be used as a 2FA key with a username and password, it theoretically should work on Android. However, it will only work if the
FIDO U2Finterface is enabled in the YubiKey Manager. I assume this is because a 2FA only request that does not require a PIN can fall back to CTAP1/U2F and correctly authenticate.EDIT: Just for further detail, signing in to Google with a Discoverable FIDO2 key registered doesn't seem to be able to fall back to U2F in a 2FA situation where you provide a username and password, even if it works on PC in the same way without a PIN. I assume this is because a Discoverable credential cannot fall back to U2F in any situation.
This reddit post was what tipped me off to the reasoning, and this google groups post had information about Android not implementing CTAP2.
With FIDO U2F disabled, both Firefox and Chrome give errors, though different.
Chrome gives the error;
Firefox gives the error;
To summarise;
@phil-w commented on GitHub (Jul 8, 2023):
Same NotAllowedError from the Bitwarden app.
I'd add that if I use my same default browser (Brave) to access the Bitwarden website itself from Android 13, the FIDO2 2FA also fails in the same way. => I can't use Bitwarden with 2fa via Android, although it works fine from Windows.
@AlmAck commented on GitHub (Jul 10, 2023):
Exact same problem, on android (Pixel5) was working just fine, I had to change the KDF iteration and after that I can't login anymore with the NFC key on my phone. I tried to used also firefox, switch network, reinstall... still nothing. On desktop linux works fine.
Android: 13
Bitwarden app: 2023.5.0
EDIT:
I fixed my problem by removing the FIDO key as 2 factor authentication and adding it back. My FIDO was marked as (migrated) in the vault configuration panel, that could be the issue.
I got the idea from this issue: https://github.com/bitwarden/clients/issues/2803
@smury commented on GitHub (Jul 24, 2023):
I had the same issue (Android 13, Pixel 6a) and also recently changed my KDF iteration (though I think my keys (Yubico Security key) were already marked as migrated from FIDO before that).
Anyway, @AlmAck's fix worked for me.
@phil-w commented on GitHub (Jul 25, 2023):
As per @AlmAck my keys were marked "migrated" as I'd followed Bitwarden's request to change my "KDF iteration" also. That fix worked for my Android 10 tablet, on which I can now login via browser (Brave, shields up). So at least I can get a password that way.
However... the App still fails as before on my Android 13 phone, and using the same Brave browser also fails there, shields up or down. The symptom is the same - it hangs after the NFC read and if you "back" a few times, you can get back to the web page with the errors in red boxes.
Ah well, so removing then re-adding the keys (a) clears the "migrated" marking, and (b) fixes my Android 10 browser at least. So some progress... that's at least one thing needs to be added to the "increase your KDF Iteration" instructions, which is that once you've done it, you need to remove and re-add all FIDO2 keys or they're "migrated", which means "broken".
@mderazon commented on GitHub (Nov 22, 2023):
Bitwarden TWO-STEP LOGIN FIDO2 WebAuthn screens mentiones this warning:
Does that mean that the feature is not supported in mobile at all ?
If I am using this website on the same phone with the same key and same browser it works fine:
https://www.token2.com/tools/fido2-demo
Problem is that since Bitwarden is a critical system for many people, you want to have good security on it, and physical keys are the best security possible.
Without the mobile support, you cannot enable physical only based auth
@fliespl commented on GitHub (Apr 7, 2024):
I just stumbled across this one and failed after 30 minutes to use yubikey 5 nfc. Always reverted to try again screen.
@callit commented on GitHub (Apr 26, 2024):
I was having this problem all day today. I tried a bunch of things, and some combination of the below finally worked. Here's what I did:
I believe one of these steps was the actual solution:
After all of that, it finally let me through. My suspicion is that it was some combination of the YubiKey OTP being enabled and/or having the "Migrated from FIDO" token, but the double authentication in the last step could have something to do with it as well.
Hopefully this helps someone.
@vvolkgang commented on GitHub (Jun 20, 2024):
Issue migrated to https://github.com/bitwarden/mobile/issues/1594
@mderazon commented on GitHub (Jun 21, 2024):
@vvolkgang downloaded the new beta (native Android app) tried to authenticate with FIDO2 security key and it's still not working. Dialog says:
Any way I can DM you a screencast in private ? I prefer for some sensitive data not to appear publicly
@vvolkgang commented on GitHub (Jun 21, 2024):
@mderazon can you open a new ticket please?
Were you able to disable the screen recording protection?
I'll circle back about sharing the video in private.
@mderazon commented on GitHub (Jun 21, 2024):
@vvolkgang sure will open a new ticket in this repo
Yes, I was able to record it. I can DM you on the community forum if you tell me your username
@vvolkgang commented on GitHub (Jun 21, 2024):
@mderazon do you have an email I can reach out?
@mderazon commented on GitHub (Jun 21, 2024):
@vvolkgang sent you a DM on the community forum
Created a new issue
https://github.com/bitwarden/android/issues/3334