From 3a52cc8eb0e603d34bdee5f692d903aa5d4fff2d Mon Sep 17 00:00:00 2001 From: overtrue Date: Sun, 27 Mar 2016 16:49:24 +0800 Subject: [PATCH] Avoid custom state. --- src/Providers/AbstractProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Providers/AbstractProvider.php b/src/Providers/AbstractProvider.php index 6054cb9..49a5206 100644 --- a/src/Providers/AbstractProvider.php +++ b/src/Providers/AbstractProvider.php @@ -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; } /**