okta / okta-react-native

OIDC enablement for React Native applications
https://github.com/okta/okta-react-native
Other
58 stars 38 forks source link

signInWithBrowser() does not open browser in Android #421

Open nassimerrahoui opened 2 months ago

nassimerrahoui commented 2 months ago

Describe the bug?

signInWithBrowser() does not open browser in Android without any error.

What is expected to happen?

Open browser to signIn in okta hosted widget.

What is the actual behavior?

When I launch my react native app, then click on signInWithBrowser() then nothing happen.

And my config is correct and it's displayed.

Reproduction Steps?

Create a React Native App with Expo and Typescript. Then, install okta react native dependency Then configure your okta oidc config with correct information like:

Then call createConfig with that configuration in App.tsx

Then call signInWithBrowser

Additional Information?

No response

SDK Version

@okta/okta-react-native: 2.12.0

Build Information

No response

rajdeepnanua-okta commented 2 months ago

Hi @nassimerrahoui, thanks for filing this bug. I will look into this soon and provide relevant updates on this issue.

nassimerrahoui commented 2 weeks ago

It is working now on IOS. But in Android, signInWithBrowser does not open browser even if i added this in app's build.gradle

        manifestPlaceholders = [
            appAuthRedirectScheme: "com.myapp.name"
        ]
...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
...

    implementation("com.okta.android:okta-oidc-android:1.3.4")
    implementation("androidx.browser:browser:1.5.0")
nassimerrahoui commented 2 weeks ago

I tested with an empty projet and it works, maybe it's a wrong configuration, I'll keep you informed of the cause.