Skip to content

Commit 2e9b6fd

Browse files
author
Eric Toombs
committed
Do not attempt to refresh without a frefresh token.
1 parent 66f1761 commit 2e9b6fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

requests_oauthlib/oauth2_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def request(
503503
)
504504
# Attempt to retrieve and save new access token if expired
505505
except TokenExpiredError:
506-
if self.auto_refresh_url:
506+
if self.auto_refresh_url and 'refresh_token' in self.token:
507507
log.debug(
508508
"Auto refresh is set, attempting to refresh at %s.",
509509
self.auto_refresh_url,

0 commit comments

Comments
 (0)