IdpHandler

interface IdpHandler

Interface for handling authentication with external Identity Providers (IdPs).

This interface defines the contract for implementations that manage authentication flows with third-party identity providers such as Google, Facebook, Apple, etc. Each implementation is responsible for:

  1. Launching the appropriate authentication UI or flow

  2. Handling the authentication response

  3. Extracting tokens and other relevant information

  4. Returning a standardized result

Implementations should handle all provider-specific details internally, including error handling, token validation, and user cancellation.

Properties

Link copied to clipboard
abstract var tokenType: String

The token type used by the Identity Provider.

Functions

Link copied to clipboard
abstract suspend fun authorize(idpClient: IdpClient): IdpResult

Initiates and completes the authorization flow with the identity provider.