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);
  }
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);
  }
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 ) ; }
Returns the redirect response.

@param string $type
Type of action, "login" or "register".

@return \Drupal\Core\Routing\TrustedRedirectResponse|\Symfony\Component\HttpFoundation\RedirectResponse
Returns a RedirectResponse.
Returns the redirect response .