Skip to content

Commit

Permalink
refresh google token
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Sep 13, 2024
1 parent 784379f commit 9f1027c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions breathecode/services/google_meet/google_meet.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ def _get_credentials(
client_id=os.getenv("GOOGLE_CLIENT_ID"),
client_secret=os.getenv("GOOGLE_CLIENT_SECRET"),
)
creds.refresh(Request())
elif os.path.exists(TOKEN_FILE_NAME):
with open(TOKEN_FILE_NAME, "rb") as token:
creds = pickle.load(token)
creds.refresh(Request())

# If there are no valid credentials available, raise an exception
if not creds or not creds.valid:
Expand Down

0 comments on commit 9f1027c

Please sign in to comment.