diff --git a/src/Grant/AuthCodeGrant.php b/src/Grant/AuthCodeGrant.php index 6f2b6ff8..6a342228 100644 --- a/src/Grant/AuthCodeGrant.php +++ b/src/Grant/AuthCodeGrant.php @@ -249,9 +249,9 @@ class AuthCodeGrant extends AbstractAuthorizeGrant $scopes = $this->validateScopes( $this->getQueryStringParameter('scope', $request, $this->defaultScope), - is_array($client->getRedirectUri()) + $redirectUri ?: (is_array($client->getRedirectUri()) ? $client->getRedirectUri()[0] - : $client->getRedirectUri() + : $client->getRedirectUri()) ); $stateParameter = $this->getQueryStringParameter('state', $request); diff --git a/src/Grant/ImplicitGrant.php b/src/Grant/ImplicitGrant.php index f3c9e694..a10ac642 100644 --- a/src/Grant/ImplicitGrant.php +++ b/src/Grant/ImplicitGrant.php @@ -158,9 +158,9 @@ class ImplicitGrant extends AbstractAuthorizeGrant $scopes = $this->validateScopes( $this->getQueryStringParameter('scope', $request, $this->defaultScope), - is_array($client->getRedirectUri()) + $redirectUri ?: (is_array($client->getRedirectUri()) ? $client->getRedirectUri()[0] - : $client->getRedirectUri() + : $client->getRedirectUri()) ); // Finalize the requested scopes