Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signInWithBrowser() not able to open webview (Auth page) for sign. #423

Open
mahipalsingh-syt opened this issue May 15, 2024 · 6 comments
Open
Labels
bug Something isn't working

Comments

@mahipalsingh-syt
Copy link

mahipalsingh-syt commented May 15, 2024

Describe the bug?

signInWithBrowser() not able to open webview for sign.

What is expected to happen?

when signInWithBrowser() called it should open webView (Auth page).

What is the actual behavior?

signInWithBrowser() is not returning anything

Reproduction Steps?

ReactNative : 0.73.6

create config file
and then call signInWithBrowser() .

Additional Information?

same okta config working fine this lib : with https://www.npmjs.com/package/react-native-app-auth

SDK Version

"@okta/okta-react-native": "2.12.0",

Build Information

No response

@mahipalsingh-syt mahipalsingh-syt added the bug Something isn't working label May 15, 2024
@mahipalsingh-syt mahipalsingh-syt changed the title signInWithBrowser() not able to open webview for sign. signInWithBrowser() not able to open webview (Auth page) for sign. May 15, 2024
@mahipalsingh-syt
Copy link
Author

its working when i set requireHardwareBackedKeyStore:false

@nassimerrahoui
Copy link

I tried with requireHardwareBackedKeyStore:false but i got the same error :/

@MobileMon
Copy link

same for me

it works on iOS but on Android nothing happens

@MobileMon
Copy link

MobileMon commented Jun 14, 2024

i fixed it by doing this

manifestPlaceholders = [
                urlScheme: "myvalues",
                appLinkHost: "values",
                 appAuthRedirectScheme: "myvalues"
        ]

where as previously i was doing this

        manifestPlaceholders.urlScheme = "values"
                manifestPlaceholders.appLinkHost = "values"

        manifestPlaceholders.appAuthRedirectScheme = "values"

@nassimerrahoui
Copy link

nassimerrahoui commented Aug 12, 2024

Solution which works for me :

In Android folder built and build.gradle from app folder :

    defaultConfig {
        ...
        manifestPlaceholders = [
            appAuthRedirectScheme: 'my.redirect.uri'
        ]
    }

    ...

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = '17'
    }

    ...

    dependencies {
        ...
        implementation 'com.okta.android:okta-oidc-android:1.3.4'
        ...
    }

Then in createConfig use requireHardwareBackedKeyStore: false

Important point : Be careful with useEffects, which can also hinder the opening of the Okta page.

@Justicea83
Copy link

#421 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants