okta-react-native icon indicating copy to clipboard operation
okta-react-native copied to clipboard

"Error not specified." if the device does not have a browser that supports chrome custom tabs

Open SMJ93 opened this issue 3 years ago • 7 comments

Describe the bug?

In the okta-oidc-android documentation it says the okta library only supports Chrome custom tab enabled browsers.

We have been running some tests on our app as lots of users have been complaining about login on Android and here are our findings: Screenshot 2022-03-11 at 10 19 07

We have since added the browserMatchAllFlag which will hopefully improve things.

Unfortunately this still doesn't help if the user does not have a browser that support Chrome custom tabs. e.g. On a OnePlus phone with only DuckDuckGo.

When trying to login with Google via the browser in this scenario with:

import * as OktaRN from "@okta/okta-react-native";

OktaRN.signInWithBrowser({ idp })

it returns the following error: Screenshot 2022-03-11 at 10 25 21

What is expected to happen?

It should return a specific error like:

code: 1234,
message: "No browser with Chrome custom tabs found"

This would allow us to handle it more appropriately in the app and let the user know they need to install Chrome to login with Google.

What is the actual behavior?

It returns a generic error:

message: "Error not specified."

Reproduction Steps?

On any Android device install DuckDuckGo browser from Google Play, set it as the default browser and remove all other browsers.

When trying to login with Google via the browser in this scenario with:

import * as OktaRN from "@okta/okta-react-native";

OktaRN.signInWithBrowser({ idp })

it returns the following error: Screenshot 2022-03-11 at 10 25 21

Additional Information?

No response

SDK Version

"@okta/okta-react-native": "2.3.0"

Build Information

No response

SMJ93 avatar Mar 11 '22 10:03 SMJ93

Hi @SMJ93, thanks for the deep dive. I'm noticing it looks like some browsers don't support chrome custom tabs, and it looks like the OnePlus device acts completely different than the rest. I don't have a OnePlus device handy to reproduce this though.

In general, we recommend using Chrome, as that's what we use for testing.

It sounds like the ask here is to provide better error messages, and I'll admit, that's an error that we can be inconsistent in.

I've added a ticket to our backlog to improve error messaging here: OKTA-478919

JayNewstrom avatar Mar 11 '22 16:03 JayNewstrom

Hi @JayNewstrom, thanks for getting back so quickly!

Yeah most of us use Chrome ourselves, but lots of our customers don't so are complaining about the issue unfortunately.

Better error messaging would be great! Any idea how long it will take to implement?

SMJ93 avatar Mar 11 '22 17:03 SMJ93

I'm sorry, we don't give timeframes for updates.

JayNewstrom avatar Mar 11 '22 20:03 JayNewstrom

Hi @SMJ93 I've been testing with a bunch of these browsers in our new SDK https://github.com/okta/okta-mobile-kotlin

And it's looking like support is going to be much better. However, given your tests above, you had lots of issues with the OnePlus device. Would you be able to give the sample in that repo a try to see if things are properly working on OnePlus devices?

JayNewstrom avatar May 07 '22 18:05 JayNewstrom

Hi @JayNewstrom, will @okta/okta-react-native be updated to use this new SDK?

SMJ93 avatar May 09 '22 08:05 SMJ93

Hi @SMJ93 we do plan to update our cross platform SDKs to use the new mobile SDKs. But no timeline yet.

JayNewstrom avatar May 09 '22 14:05 JayNewstrom