You are here

function hook_gauth_google_response in Google Auth 8

Same name and namespace in other branches
  1. 7.2 gauth.api.php \hook_gauth_google_response()
  2. 7 gauth.api.php \hook_gauth_google_response()

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.

1 invocation of hook_gauth_google_response()
GauthResponseHandler::responseHandler in src/Entity/Controller/GauthResponseHandler.php
Function handles google response.

File

./gauth.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.
  }
}