diff --git a/automon/integrations/google/auth/client.py b/automon/integrations/google/auth/client.py index b4aa5066..0ffa75bc 100644 --- a/automon/integrations/google/auth/client.py +++ b/automon/integrations/google/auth/client.py @@ -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')