Browser not opening on Android when using a default browser other than Chrome
Describe the bug?
We've been getting a few reports from users who are unable to sign in to our mobile app due to the login screen not showing up in the browser. I was able to reproduce this issue on a physical device on the sample app when I installed a browser other than Chrome (such as DuckDuckGo) and attempted to sign in. The browser just doesn't open.
What is expected to happen?
I expect the browser to pop up w/ the okta sign in URL so that the user can sign in.
What is the actual behavior?
Nothing pops up.
Reproduction Steps?
Tested this on a OnePlus Nord N200 5G phone
- Set up the sample app from https://github.com/okta/samples-js-react-native/tree/master/browser-sign-in
- Have Chrome set as the default browser initially
- Log in (this will work)
- Change the default browser to DuckDuckGo
- Log in (this will not work)
- Change the default browser to Chrome
- Log in (this will work again)
The steps above were also reproducible on our mobile app
Additional Information?
No response
SDK Version
"@okta/okta-react-native": "2.1.1" is what our mobile app is using
"@okta/okta-react-native": "~2.3.0" is what the sample app was using that I reproduced the issue on
Build Information
No response
Hi, thanks for the report. We provide support for customizing this behavior in the SDK this uses on Android https://github.com/okta/okta-oidc-android#providing-browser-used-for-authorization
@NikitaAvraimov-okta could you try to reproduce this and see if this fixes it?
We’ll need to figure out how best to support this in this SDK, since that functionality isn’t cross platform.
@BenjYn For the scenario when chrome is installed but not used as a default browser you should be using browserMatchAll flag. For browserSignIn scenario we can only work with browsers which support chrome custom tabs. Try passing browserMatchAllFlag = true, this should be sufficient for your use case ref #73
Same issue with Android 9 simulator and Motorola physical device. Any solution team?
A browser with Chrome Custom Tabs is required for proper functionality. The next major version will depend on https://github.com/okta/okta-mobile-kotlin which works with and without Chrome Custom Tabs.