okta / okta-oidc-android

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

ChromeCustomTab opens outside of the app for first time. #300

Closed gopalp1709 closed 2 years ago

gopalp1709 commented 2 years ago

I have observed ChromeCustomTab in recent apps for first time when user try to sign in on new device. Also I tried on emulator and observed where chrome opens and take consent before sign in page. After that I removed chrome tab and app from recent. Then tried to sign in but it didn't appeared in recent for subsequent sign in. I have already added below code in my app.

<activity android:name="com.okta.oidc.OktaAuthenticationActivity" android:launchMode="singleTop" tools:replace="android:launchMode" />

NikitaAvraimov-okta commented 2 years ago

Hi @gopalp1709, can you clarify what exactly are you trying to achieve here? Do you want ChromeCustomTab to be asbent in recent apps, right?

gopalp1709 commented 2 years ago

Yes I want ChromeCustomTab to be absent in recent apps , it's showing CCT and app in recent apps for first time . You can verify on android emulator , ensure emulator is newly created or you can wipe data of emulator and check.

NikitaAvraimov-okta commented 2 years ago

Would you please be able to try and reproduce this issue in our sample app?

gopalp1709 commented 2 years ago
twowindows

I am able to reproduce with sample code used below dependency implementation 'com.okta.android:okta-oidc-android:1.2.2'

NikitaAvraimov-okta commented 2 years ago

thanks, we are taking a look

NikitaAvraimov-okta commented 2 years ago

@gopalp1709 it is indeed shown in recent apps if chrome was never launcher prior. We`ll check what we can do to prevent this, thank you for your observation!

NikitaAvraimov-okta commented 2 years ago

Internal ref: OKTA-468775

JayNewstrom commented 2 years ago

It doesn't look like we can do anything to fix this.

This is happening because Chrome is opening another activity (to ask the user the initial questions). This causes our flow to be overridden.

Due to this being an extreme edge case, I think this is acceptable.