okta / okta-oidc-android

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

Okta SyncAuthWebClient sign in is not working on Android OS 14 #353

Closed Jeremy-Brown14 closed 8 months ago

Jeremy-Brown14 commented 8 months ago

Describe the bug?

So we have a SyncAuthWebClient implementation which worked perfect on OS 13, after upgrading to OS 14 and logging out of our application, I was unable to log back in. Okta does not redirect back to the application after logging in, it just sits there on the Okta login page. It attempts to switch back to the application, but it does not actually do so.

What is expected to happen?

Successful login on Android 14.

What is the actual behavior?

Login returns CANCELED after returning to the application by closing the Chrome browser, which is the only option for the user. Subsequent login attempts just say, invalid token not authenticated.

Reproduction Steps?

Install Android OS 14 and install an application that connects to an Okta server and uses the SyncAuthWebClient to sign in and sign out. It will fail to login, because the redirect never occurs.

Additional Information?

It occurred precisely upon upgrading to Android 14, logging out of the application and attempting to log back in on a Pixel 6 Pro and Pixel 7 Pro, as well as in an SDK 34 emulator with Google Play using the latest version of Chrome.

SDK Version

1.3.2 and 1.3.4

Build Information

Building with Gradle 8.1 against SDK 34.

Jeremy-Brown14 commented 8 months ago

This was resolved by changing the MainActivity launchMode from singleInstance to singleInstancePerTask.