authorize

abstract suspend fun authorize(idpClient: IdpClient): IdpResult

Initiates and completes the authorization flow with the identity provider.

This suspending function will:

  1. Configure the authorization request using the provided idpClient

  2. Launch the appropriate UI for user authentication

  3. Process the authentication response

  4. Return the authentication result

Implementations should handle all provider-specific details, including error scenarios and user cancellation.

Return

IdpResult containing the authentication token and any additional parameters

Parameters

idpClient

The client configuration containing parameters required for authorization

Throws

if the authentication fails or is cancelled