BrowserSelector

fun interface BrowserSelector

Selects which browser package should host the Chrome Custom Tab used for the OIDC redirect flow.

The default implementation used by DefaultWebAuthenticationProvider queries for installed Custom Tabs providers, confirms each candidate can actually handle http(s) links, and prefers DefaultWebAuthenticationProvider.preferredBrowsers in order. Implement this interface (and pass it to DefaultWebAuthenticationProvider's constructor) to fully control browser selection, e.g. for testing or device-specific overrides.

Functions

Link copied to clipboard
abstract fun selectBrowser(context: Context): Result<String>

Returns the package name of the browser to restrict the Custom Tab launch to.