Vyacheslav Slinko

Check default parameters in authorize url

... ... @@ -132,7 +132,9 @@ class OAuth2_Service
if ($this->_scope) {
$parameters['scope'] = $this->_scope;
}
$url = $this->_configuration->getAuthorizeEndpoint() . '?' . http_build_query($parameters);
$url = $this->_configuration->getAuthorizeEndpoint();
$url .= (strpos($url, '?') !== false ? '&' : '?') . http_build_query($parameters);
header('Location: ' . $url);
die();
... ...