You are here

function hook_gauth_account_scopes_alter in Google Auth 8

Allows other modules to modify the scope before authentication.

Developers may add or remove scopes, like in this example I remove the gmail metadata scope.

1 invocation of hook_gauth_account_scopes_alter()
Gauth::getGauthClient in src/Entity/Gauth.php
Function to retrieve the google client for different operations.

File

./gauth.api.php, line 34
Hooks provided by the GAuth module.

Code

function hook_gauth_account_scopes_alter($scopes, $gauth_id) {
  if ($gauth_id == 1) {
    unset($scopes['gmail']['GMAIL_METADATA']);
  }
}