Flutter: getAuthorizationDetails

Retrieves details about a pending OAuth authorization request so you can render a consent screen. The authorizationId is provided as a query parameter on the redirect URL that starts the flow.

Parameters

Examples

Get authorization details

final authorizationId =
    Uri.parse(currentUrl).queryParameters['authorization_id']!;

final response =
    await supabase.auth.oauth.getAuthorizationDetails(authorizationId);

switch (response) {
  case OAuthAuthorizationRedirectResponse(:final redirectUrl):
    // The user already consented; forward them without a consent screen.
    break;
  case OAuthAuthorizationDetailsResponse(:final client, :final scope):
    // Render a consent screen for `client` requesting `scope`.
    break;
}