I am using the AppAuth library and I want it to use custom tabs but it never does on the emulator with play store support or on my device which is an HTC U11 running Oreo. Chrome is installed. I have tried a bunch of configurations but no luck.
val authService = AuthorizationService(applicationContext)
val authIntent = authService.getAuthorizationRequestIntent(authRequest,
authService.createCustomTabsIntentBuilder(Uri.parse(authorizationManager.openIdConfig!!.authorization_endpoint)).build())
startActivityForResult(authIntent, REQUEST_AUTH)
I tried with and without the createCustomTabsIntentBuilder, exact same results either way. Figure I am missing one last piece of secret sauce here, just don't know what it is.
Everything works fine, I do get authorized, rest of code works, it just always uses an external browser.
** SOLVED ** The current AppAuth library does not support AndroidX. I pulled the code for the library, added it as a module to my app, updated the code to AndroidX and changed one line to use the proper CustomTab string and now it all works as expected.
BrowserSelector.java line 187 is now
serviceIntent.setAction(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);