okta / okta-oidc-android

OIDC SDK for Android
https://github.com/okta/okta-oidc-android
Other
60 stars 45 forks source link

No compatible browser found #334

Closed amsheerS closed 1 year ago

amsheerS commented 1 year ago

Describe the bug?

Authorization error AuthorizationException: {"type":0,"code":10,"errorDescription":"No compatible browser found"}

What is expected to happen?

Only few devices getting the error called "No compatible browser found"

What is the actual behavior?

Needs to open the web ui and show the login screen.

Reproduction Steps?

Just install app and click signin. Only few of the devices showing the error called AuthorizationException: {"type":0,"code":10,"errorDescription":"No compatible browser found"}

Additional Information?

Trying from mobile phones not from emulator

SDK Version

// Add the web-authentication-ui SDK to the project. implementation('com.okta.kotlin:auth-foundation-bootstrap') implementation('androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1') implementation('androidx.activity:activity-ktx:1.5.1')

 implementation 'com.okta.android:okta-oidc-android:1.3.2'
implementation 'androidx.biometric:biometric:1.1.0'
implementation 'com.okta.authn.sdk:okta-authn-sdk-api:2.0.7'
implementation('com.okta.authn.sdk:okta-authn-sdk-impl:2.0.7') {
    exclude group: 'com.okta.sdk', module: 'okta-sdk-httpclient'
}
implementation 'androidx.security:security-crypto:1.0.0'

implementation group: 'com.okta.commons', name: 'okta-http-api', version: '1.3.0'

implementation(platform('com.okta.kotlin:bom:1.0.0'))

Build Information

No response

JayNewstrom commented 1 year ago

Based on your dependencies, you've got a combination of https://github.com/okta/okta-mobile-kotlin and this repo. I'd suggest moving fully over to okta-mobile-kotlin, as that's where all new development effort is going.

This particular issue is one of the big issues the rewrite solved!

There's a sample on how to do custom sign in here, which appears to be what you're trying to do based on your dependencies.

As you can see from previous issues in this repo, the issue you mentioned has been around for a long time, with a few potential work arounds, but none as robust as the implementation in okta-mobile-kotlin.