Skip to content

Commit fbf4546

Browse files
authored
Invalidate tokens within the expiry margin (#88)
1 parent f9efa9f commit fbf4546

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

emailproxy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ def get_account_with_catch_all_fallback(option):
411411
OAuth2Helper.encrypt(fernet, response['refresh_token']))
412412
AppConfig.save()
413413

414-
elif access_token_expiry <= current_time:
415-
access_token = None # avoid trying invalid tokens
414+
else:
415+
access_token = None # avoid trying invalid (or soon to be) tokens
416416
else:
417417
access_token = OAuth2Helper.decrypt(fernet, access_token)
418418

0 commit comments

Comments
 (0)