protected function getCodeFields($state = null)
{
$fields = array_merge(['client_id' => $this->clientId, 'redirect_uri' => $this->redirectUrl, 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), 'response_type' => 'code'], $this->parameters);
if ($this->usesState()) {
$fields['state'] = $state;
}
return $fields;
}