protected function GoogleAuthController::getRedirectResponse in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_google/src/Controller/GoogleAuthController.php \Drupal\social_auth_google\Controller\GoogleAuthController::getRedirectResponse()
 - 8.2 modules/custom/social_auth_google/src/Controller/GoogleAuthController.php \Drupal\social_auth_google\Controller\GoogleAuthController::getRedirectResponse()
 - 8.3 modules/custom/social_auth_google/src/Controller/GoogleAuthController.php \Drupal\social_auth_google\Controller\GoogleAuthController::getRedirectResponse()
 - 8.4 modules/custom/social_auth_google/src/Controller/GoogleAuthController.php \Drupal\social_auth_google\Controller\GoogleAuthController::getRedirectResponse()
 - 8.5 modules/custom/social_auth_google/src/Controller/GoogleAuthController.php \Drupal\social_auth_google\Controller\GoogleAuthController::getRedirectResponse()
 - 8.6 modules/custom/social_auth_google/src/Controller/GoogleAuthController.php \Drupal\social_auth_google\Controller\GoogleAuthController::getRedirectResponse()
 - 8.7 modules/custom/social_auth_google/src/Controller/GoogleAuthController.php \Drupal\social_auth_google\Controller\GoogleAuthController::getRedirectResponse()
 - 8.8 modules/custom/social_auth_google/src/Controller/GoogleAuthController.php \Drupal\social_auth_google\Controller\GoogleAuthController::getRedirectResponse()
 
Returns the redirect response.
Parameters
string $type: Type of action, "login" or "register".
Return value
\Drupal\Core\Routing\TrustedRedirectResponse|\Symfony\Component\HttpFoundation\RedirectResponse Returns a RedirectResponse.
2 calls to GoogleAuthController::getRedirectResponse()
- GoogleAuthController::userLogin in modules/
custom/ social_auth_google/ src/ Controller/ GoogleAuthController.php  - Response for path 'user/login/google'.
 - GoogleAuthController::userRegister in modules/
custom/ social_auth_google/ src/ Controller/ GoogleAuthController.php  - Response for path 'user/register/google'.
 
File
- modules/
custom/ social_auth_google/ src/ Controller/ GoogleAuthController.php, line 55  
Class
- GoogleAuthController
 - Class GoogleAuthController.
 
Namespace
Drupal\social_auth_google\ControllerCode
protected function getRedirectResponse($type) {
  $sdk = $this
    ->getSdk($type);
  if ($sdk instanceof RedirectResponse) {
    return $sdk;
  }
  $this->authManager
    ->setSdk($sdk);
  $url = $this->authManager
    ->getAuthenticationUrl($type);
  return new TrustedRedirectResponse($url);
}