From e23aac4e41708d21a4d7894b601acdcc41aa67b6 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:00:55 -0500 Subject: [PATCH] Remove redundant checks --- oauthenticator/google.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/oauthenticator/google.py b/oauthenticator/google.py index b0548d5b..dcd9bcc5 100644 --- a/oauthenticator/google.py +++ b/oauthenticator/google.py @@ -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): """