authorize

suspend fun authorize(redirectUri: Uri = "".toUri(), idpHandler: IdpHandler? = getIdpHandler(redirectUri)): Result<IdpResult>

Initiates the authentication flow with the external identity provider.

This method:

  1. Determines the appropriate handler for the configured provider

  2. Launches the external authentication flow

  3. Processes the authentication result

Return

A Result containing the IdpResult if successful, or an error if the authentication failed

Parameters

redirectUri

The redirect URI for the browser-based IdP authentication (Apple Sign-In)

idpHandler

Optional custom handler; if not provided, one will be selected based on provider