From f87bc0da174df3ef260799cb2ad6d91c2dee37f9 Mon Sep 17 00:00:00 2001 From: brentru Date: Tue, 12 Jan 2021 16:51:17 -0500 Subject: [PATCH] fix refresh_token set --- adafruit_oauth2.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/adafruit_oauth2.py b/adafruit_oauth2.py index a995022..8b166ce 100644 --- a/adafruit_oauth2.py +++ b/adafruit_oauth2.py @@ -79,13 +79,12 @@ def __init__( # The scopes of access granted by the access_token as a list self.access_token_scope = None - if access_token: - # The token that your application sends to authorize a Google API request - self.access_token = access_token - if refresh_token: - # A token that you can use to obtain a new access token - # Refresh tokens are valid until the user revokes access - self.refresh_token = None + # The token that your application sends to authorize a Google API request + self.access_token = access_token + + # A token that you can use to obtain a new access token + # Refresh tokens are valid until the user revokes access + self.refresh_token = refresh_token def request_codes(self): """Identifies your application and access scopes with Google's