public function getAuthorizationUri(array $additionalParameters = [])
	{
		$parameters = array_merge($additionalParameters, [
			'type' => 'web_server',
			'client_id' => $this->credentials->getConsumerId(),
			'redirect_uri' => $this->credentials->getCallbackUrl(),
			'response_type' => 'code',
		]);

		$parameters['scope'] = implode($this->service->getScopeSeparator(), $this->scopes);

		if ($this->needsStateParameterInAuthUrl()) {
			if (!isset($parameters['state'])) {
				$parameters['state'] = $this->generateAuthorizationState();
			}
			$this->storeAuthorizationState($parameters['state']);
		}

		// Build the url
		$url = clone $this->getAuthorizationEndpoint();
		foreach ($parameters as $key => $val) {
			$url->addToQuery($key, $val);
		}

		return $url;
	}