Skip to content

Commit

Permalink
Merge pull request #774 from jrdnbradford/remove-redundancies-google
Browse files Browse the repository at this point in the history
[Google] Remove redundant service credential checks
  • Loading branch information
minrk authored Nov 11, 2024
2 parents 90da9d7 + e23aac4 commit 9031e4c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions oauthenticator/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,7 @@ def _is_token_valid(self, user_email_domain):
"""
Checks if the stored token is valid.
"""
if not self._service_credentials[user_email_domain]:
return False
if not self._service_credentials[user_email_domain].token:
return False
if self._service_credentials[user_email_domain].expired:
return False

return True
return self._service_credentials[user_email_domain].valid

def _service_client_credentials(self, scopes, user_email_domain):
"""
Expand Down

0 comments on commit 9031e4c

Please sign in to comment.