You are here

public function GoogleAuthManager::getAccessToken in Social Auth Google 8

1 call to GoogleAuthManager::getAccessToken()
GoogleAuthManager::authenticate in src/GoogleAuthManager.php

File

src/GoogleAuthManager.php, line 56

Class

GoogleAuthManager
Manages the authentication requests.

Namespace

Drupal\social_auth_google

Code

public function getAccessToken() {
  if (!$this->accessToken) {
    $this->accessToken = $this->client
      ->fetchAccessTokenWithAuthCode($this
      ->getCode());
  }
  return $this->accessToken;
}