protected function buildAuthUrlFromBase($url, $state)
{
$session = $this->request->getSession();
$redirectUrl = $this->redirectUrl;
if (!starts_with($redirectUrl, 'http')) {
$redirectUrl = 'http://' . $redirectUrl;
}
return $url . '?' . http_build_query(['client_id' => $this->clientId, 'client_secret' => $this->clientSecret, 'redirect_uri' => $redirectUrl, 'scope' => $this->formatScopes($this->scopes, ' '), 'state' => $state, 'response_type' => 'code']);
}