You are here

function hook_gauth_account_scopes_alter in Google API PHP Client 8.2

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.

File

./google_api_client.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']);
  }
}