TabIntentLauncher

Interface for browser tab launchers used in authentication flows.

This interface defines the common contract for different types of browser launchers (e.g., Auth Tab or Custom Tab) and abstracts away the differences in their implementation.

The library provides two implementations:

  • AuthTabIntentLauncher: Uses Chrome's Auth Tab API for enhanced security with custom schemes

  • CustomTabsIntentLauncher: Uses standard Chrome Custom Tabs

The appropriate launcher is selected based on device capabilities and redirect URI scheme.

Properties

Link copied to clipboard

The ActivityResultLauncher used to launch the browser intent and receive results.

Link copied to clipboard
abstract val state: MutableStateFlow<ActivityResult?>

StateFlow to track and communicate the result of the browser launch.

Functions

Link copied to clipboard
abstract suspend fun launch(url: String, redirectUri: Uri, pending: Boolean = false): Result<Uri>

Launches a URL in a browser tab and waits for the authentication to complete.