You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/Service/TokenService.php
+17-2Lines changed: 17 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -84,8 +84,8 @@ public function getToken(bool $refreshIfExpired = true): ?Token {
84
84
}
85
85
86
86
// token has expired
87
-
// try to refresh the token if the refresh token is still valid
88
-
if ($refreshIfExpired && !$token->refreshIsExpired()) {
87
+
// try to refresh the token if there is a refresh token and it is still valid
88
+
if ($refreshIfExpired && $token->getRefreshToken() !== null && !$token->refreshIsExpired()) {
89
89
$this->logger->debug('[TokenService] getToken: token is expired and refresh token is still valid, refresh expires in ' . $token->getRefreshExpiresInFromNow());
90
90
return$this->refresh($token);
91
91
}
@@ -102,6 +102,12 @@ public function getToken(bool $refreshIfExpired = true): ?Token {
0 commit comments