As requested on the OKTA forum, I’m providing the context and details regarding the webview issue we have on a Pocophone device, as mail.
Using the React Native OKTA Library/SDK ( @okta /okta-react-native 1.4.1), we integrated the OKTA flow within our app. We’re triggering the in-app browser with the OKTA sign in page to let users authenticate.
This flow works on several iPhone and Android devices we tested. But on a specific Android device (Pocophone F1 with Android: 10), we found out that the OKTA library couldn’t trigger the in app browser. After some investigation we could pinpoint the problem was the default browser of the phone (which was the MI Browser). After changing this default browser to Chrome, the flow worked on the Pocophone.
It seems that OKTA can’t trigger the MI Browser. We tried to pass the “supportedBrowsers” value (with the packageId of chrome and MI Browser) as indicated here, but no luck.
As for Logcat logs, we couldn’t find any pointers regarding the issue:
edd474bf-fdd9-4534-be08-fac4561c7e743086×1486 1.24 MB
First of all, is this a known issue? If yes are there any workarounds we can look into?
If this is not a known issue, is there a possibility to hook into a method or callback (the existing onerror callbacks weren’t triggered in this case), so that we can notify the user with a proper message that the login is not working on that specific device? If we could even validate and check this upfront without the user even interacting with the Sign In button, would be even better. That way we could notify the user pro-actively and provide alternatives.
Also to validate this behaviour, we tested it with the OKTA React Native sample project:
samples-js-react-native. Contribute to okta/samples-js-react-native development by creating an account on GitHub.
After adjusting the OKTA config, and running it on an Android 6 emulator, we could see that the webview didn’t trigger there too.
The OKTA RN sample (browser-sign-in) is using: “ @okta /okta-react-native”: “^1.4.0”.