[PM-40883] WebAuthn 2FA: callback cannot return to the app when Firefox is the default browser — Custom Tab lands on the bitwarden.com 404 page
- Dominant language
- Kotlin
- Stars
- 9.4k
- Forks
- 1.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 67
Description
### Steps To Reproduce
### Steps To Reproduce
1. Set Firefox for Android as the system default browser
2. Open the Bitwarden app and log in with the master password
3. On the "Verify WebAuthn" screen, press "Open WebAuthn". The connector
page opens in an in-app Custom Tab backed by the default browser
(Firefox), not in the standalone browser
4. Complete the assertion with a YubiKey 5C NFC over NFC
### Expected Result
### Expected Result
The callback returns to the Bitwarden app and the login completes.
### Actual Result
### Actual Result
The assertion succeeds, but the Custom Tab then navigates to
https://bitwarden.com/webauthn-callback?data=[REDACTED]
and renders the bitwarden.com 404 page ("It seems you have stumbled into
an empty vault"). Login never completes. Screenshot attached.
The failure is in the return step, not in the authentication.
No app hand-off is possible at that point: the connector runs in a Custom
Tab launched by the Bitwarden app itself, so the App Link cannot resolve
back into the launching app. Firefox's "Open links in apps" setting does
not apply to Custom Tabs, which is why toggling it has no effect.
### Screenshots or Videos
### Additional Context
### Additional Context
Works correctly with Samsung Internet set as the default browser, which is
the current workaround. The default browser matters even though the user
never opens a browser, because it backs the Custom Tab.
Variables ruled out, each tested with a fresh login:
- Firefox "Open links in apps": tested with both "Ask before opening" and
"Always" — no effect, and no hand-off dialog ever appears
- Firefox desktop-site mode: tested on and off — same failure
- Firefox 152.0.6 and 153.0 — same failure on both
- WireGuard VPN with "block connections without VPN", and a custom DoH
resolver: tested enabled and disabled — no effect
- Bitwarden app uninstalled and reinstalled from Play Store — no effect
Unaffected on the same account: iOS app, web vault on Windows, Firefox
extension on Windows.
This may be a regression introduced by the fix for #6313. Moving the
callback away from the bitwarden:// custom scheme to an https App Link
makes the return step depend on the Custom Tab implementation of whichever
browser happens to be the system default. Samsung Internet's handles it;
Firefox's does not.
### Build Version
2026.6.1 (21713)
### What server are you connecting to?
US
### Self-host Server Version
_No response_
### Environment Details
- Device: Samsung Galaxy S25 Ultra, Samsung Galaxy Tab S9 SM-X510
- OS: Android 16 - One UI 8.5
- Firefox for Android 153.0 (build 2016172927)
### 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.
Contributor guide
Research direction
Reproduce the flow from the Android “Verify WebAuthn” screen with Firefox as the default browser, then trace the Custom Tab return to https://bitwarden.com/webauthn-callback and compare it with Samsung Internet. Review the callback behavior introduced by #6313. Done means a successful assertion returns to the Bitwarden app and completes login when Firefox backs the Custom Tab.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100