Skip to content

Commit

Permalink
google auth: fix refresh token if hasattr fails
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Oct 7, 2024
1 parent 4207dd3 commit 3a56c30
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions automon/integrations/google/auth/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ def authenticate_oauth(self) -> bool:
"""authenticate web token"""

creds = self.config.Credentials()
refresh_token = creds.refresh_token

if refresh_token:
if hasattr(creds, 'refresh_token'):
try:
creds.refresh(google.auth.transport.requests.Request())
logger.info(f'token refresh success')
Expand Down

0 comments on commit 3a56c30

Please sign in to comment.