You are here

function hook_gauth_google_response in Google API PHP Client 8.2

A google response was received.

Modules may use this hook to carry operations based on google response. This is helpful when response other than authentication are received. Google response have data in url so $_GET can be used in this function.

File

./google_api_client.api.php, line 20
Hooks provided by the GAuth module.

Code

function hook_gauth_google_response() {
  if (isset($_GET['state'])) {
    $state = json_decode(stripslashes($_GET['state']));
    $action = $state->action;

    // Some other code to handle things.
  }
}