okta / okta-oidc-android

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

WebAuthClient not opening on devices with older OS #237

Closed adamshick-Skyward closed 3 years ago

adamshick-Skyward commented 3 years ago

I am attempting to run okta

Repro step

  1. Create project that uses WebAuthClient to signin
  2. Install on device running Android 7.1.2
  3. Call WebAuthClient#singnIn

Expected result The web client open with the correct login page

Actual result Okta SDK fails silently and the login page does not opened.

Background

I am using an unconventional device, DJI Smart controller, which runs a custom version of Android. It initially doesn't have chrome on it but I manually installed it and then tested this and it fails. I ran a more basic version of custom tabs to make sure they work (https://github.com/ohmae/custom-tabs-sample) and it works just fine opening a custom tab in chrome

JayNewstrom commented 3 years ago

Hi, thanks for the report. Are there any logs you can provide us to help debug the issue?

adamshick-Skyward commented 3 years ago

That's the weird part. There is no crash no output or anything from after WebAuthClient#singnIn is called. Nothing happens

JayNewstrom commented 3 years ago

You mentioned you are using an unconventional device. Can you confirm your setup is working on an emulator or a more standard device?

adamshick-Skyward commented 3 years ago

Yup it works just fine on other emulators and physically devices

JayNewstrom commented 3 years ago

Ok, doesn't sound like it's going to be an easy fix. I created an internal issue and added it to our backlog. OKTA-394639

adamshick-Skyward commented 3 years ago

I was looking through past issues and feature request and saw this one: https://github.com/okta/okta-oidc-android/issues/150

Is there any possibility of adding a webview fall back if custom tabs fails?

JayNewstrom commented 3 years ago

@NikitaAvraimov-okta was looking into this, but there were limitations that made this not possible.

I'll let him comment to what those limitations were.

adamshick-Skyward commented 3 years ago

Just wanted to check back in to see if @NikitaAvraimov-okta could give me a run down on why webview wouldn't work and if I should go with what this developer did, pulling down the okta sdk and building in webview themselves

NikitaAvraimov-okta commented 3 years ago

@adamshick-Skyward we would have some complications with social login so it`s unfortunately not something we would implement in the nearest future

adamshick-Skyward commented 3 years ago

Would it be possible to add a function that does use webview if we don't want to have a social login?

EtienneStPierre commented 3 years ago

We are having the same issue, I think this is the same issue that was already fixed here #228 but wasn't released. On my side, I branched the master branch and published it in my maven local, and it worked! @NikitaAvraimov-okta, any idea on the release date for that fix? Thank you!

JayNewstrom commented 3 years ago

The fix for https://github.com/okta/okta-oidc-android/issues/228 has been released. Please update to 1.0.19 (note the change in maven coordinates in the release notes: https://github.com/okta/okta-oidc-android/releases/tag/1.0.19

I'm going to close this, but feel free to reopen/comment or open a new issue