Skip to content

Commit

Permalink
Avoid custom state.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Mar 27, 2016
1 parent b3b5f54 commit 3a52cc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Providers/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,18 @@ protected function buildAuthUrlFromBase($url, $state)
*/
protected function getCodeFields($state = null)
{
$fields = [
$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 array_merge($fields, $this->parameters);
return $fields;
}

/**
Expand Down

0 comments on commit 3a52cc8

Please sign in to comment.