Skip to content

Commit 6e60d06

Browse files
committed
Persist scope from "scope" access token value, if it exists
1 parent 054a4ba commit 6e60d06

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Classes/OAuthClient.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ public function finishAuthorization(string $stateIdentifier, string $code, strin
320320
$this->logger->info(sprintf('OAuth (%s): Persisting OAuth token for authorization "%s" with expiry time %s.', $this->getServiceType(), $authorizationId, $accessToken->getExpires()));
321321

322322
$authorization->setAccessToken($accessToken);
323+
324+
$accessTokenValues = $accessToken->getValues();
325+
$scope = $accessTokenValues['scope'] ?? $scope;
323326
$authorization->setScope($scope);
324327

325328
$this->entityManager->persist($authorization);

0 commit comments

Comments
 (0)