Skip to content

Commit 27678b3

Browse files
🐛 fix: Access token not found in cache.
Checks for the existence of the access token cache
1 parent 69c7769 commit 27678b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Efi/ApiRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function send(string $method, string $route, string $scope, array $body)
4545
if (!$this->isAccessTokenValid() || !$this->options['cache']) {
4646
$this->auth->authorize();
4747
} else {
48-
if (in_array($scope, $this->cacheScopes)) {
48+
if (in_array($scope, $this->cacheScopes) && $this->cacheAccessToken) {
4949
$this->auth->accessToken = $this->cacheAccessToken;
5050
} else {
5151
$this->auth->authorize();

0 commit comments

Comments
 (0)