I am using custom tabs for OAuth and don't want chrome to keep cookies when the login session is over. Google's app-auth library doesn't give any support for that. I thought, maybe opening up the custom tab in incognito mode
would help me to solve this problem. Has anyone before run into the same problem. In custom tabs documentation I couldn't find anything helpful
As described here and introduced here, it's now possible to use custom tabs with incognito mode.
Do so by adding the "com.google.android.apps.chrome.EXTRA_OPEN_NEW_INCOGNITO_TAB"
extra to the Intent
like so:
CustomTabsIntent.Builder().build()
.apply {
if (openNewIncognitoTab) {
intent.putExtra("com.google.android.apps.chrome.EXTRA_OPEN_NEW_INCOGNITO_TAB", true)
}
}
Depending on the Chrome version, users will likely have to manually enable two Chrome flags for this to work:
chrome://flags/#cct-incognito
chrome://flags/#cct-incognito-available-to-third-party
It's not currently possible to start a Custom Tab in incognito mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With