You are here

protected function GoogleAuthManager::getCode in Social Auth Google 8

Gets the code returned by Google to authenticate.

Return value

string The code string returned by Google.

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

File

src/GoogleAuthManager.php, line 87

Class

GoogleAuthManager
Manages the authentication requests.

Namespace

Drupal\social_auth_google

Code

protected function getCode() {
  if (!$this->code) {
    $this->code = $this->request->query
      ->get('code');
  }
  return $this->code;
}