okta / okta-oidc-android

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

Custom Chrome Tabs Not Auto Closing #265

Closed RahulChandrabhan closed 2 years ago

RahulChandrabhan commented 2 years ago

After successful sign in, custom chrome tabs is not auto closed after redirect. Whenever I press back button to close my app I can see the custom chrome tab with okta sign in page

I am using following configuration

val config = OIDCConfig.Builder()
            .clientId(CLIENT_ID)
            .redirectUri(REDIRECT_URL)
            .endSessionRedirectUri(END_SESSION_URL)
            .scopes("openid", "profile", "offline_access")
            .discoveryUri("https://${OKTA_DOMAIN}")
            .create()

        val mEncryptionManager: DefaultEncryptionManager? = createSimpleEncryptionManager(this)

        client = WebAuthBuilder()
            .withConfig(config)
            .withContext(this)
            .withStorage(SharedPreferenceStorage(this))
            .withCallbackExecutor(Executors.newSingleThreadExecutor())
            .withTabColor(Color.BLUE)
            .setRequireHardwareBackedKeyStore(false)
            .withEncryptionManager(mEncryptionManager)
            .supportedBrowsers("com.android.chrome", "org.mozilla.firefox")
            .create()
JayNewstrom commented 2 years ago

Hi, it looks like this is a duplicate of https://github.com/okta/okta-oidc-android/issues/225#issuecomment-807231904 could you try that?

RahulChandrabhan commented 2 years ago

Hi, it looks like this is a duplicate of #225 (comment) could you try that?

Thank You so much, I was worried but it is now working as expected.