Skip to content

Commit f69d454

Browse files
authored
Merge pull request #1 from brentru/fix-refresh-token
Fix improperly set refresh token
2 parents 7f0f0d7 + f87bc0d commit f69d454

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

adafruit_oauth2.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,12 @@ def __init__(
7979
# The scopes of access granted by the access_token as a list
8080
self.access_token_scope = None
8181

82-
if access_token:
83-
# The token that your application sends to authorize a Google API request
84-
self.access_token = access_token
85-
if refresh_token:
86-
# A token that you can use to obtain a new access token
87-
# Refresh tokens are valid until the user revokes access
88-
self.refresh_token = None
82+
# The token that your application sends to authorize a Google API request
83+
self.access_token = access_token
84+
85+
# A token that you can use to obtain a new access token
86+
# Refresh tokens are valid until the user revokes access
87+
self.refresh_token = refresh_token
8988

9089
def request_codes(self):
9190
"""Identifies your application and access scopes with Google's

0 commit comments

Comments
 (0)