Skip to content

hook_civicrm_oauthReturnError

Summary

If an OAuth2 grant (in the "authorization code" flow) produces an error, then this hook provides details.

Availability

Hook added in CiviCRM 5.32+ as part of a core-extension (oauth-client).

Definition

hook_civicrm_oauthReturnError($error, $description, $uri, $state)

Parameters

  • $error: The error code per RFC 6749
  • $description: The error_description per RFC 6749
  • $uri: The error_uri per RFC 6749
  • $state: Any contextual state recorded when we started the OAuth request

Returns

  • null