diff --git a/google/oauth2/credentials.py b/google/oauth2/credentials.py index a2d41bd3a..7e2173ebe 100644 --- a/google/oauth2/credentials.py +++ b/google/oauth2/credentials.py @@ -148,7 +148,7 @@ def __init__( self.refresh_handler = refresh_handler self._enable_reauth_refresh = enable_reauth_refresh self._trust_boundary = trust_boundary - self._universe_domain = universe_domain + self._universe_domain = universe_domain or _DEFAULT_UNIVERSE_DOMAIN def __getstate__(self): """A __getstate__ method must exist for the __setstate__ to be called diff --git a/google/oauth2/service_account.py b/google/oauth2/service_account.py index 4b99e16eb..68db41af4 100644 --- a/google/oauth2/service_account.py +++ b/google/oauth2/service_account.py @@ -182,10 +182,7 @@ def __init__( self._quota_project_id = quota_project_id self._token_uri = token_uri self._always_use_jwt_access = always_use_jwt_access - if not universe_domain: - self._universe_domain = _DEFAULT_UNIVERSE_DOMAIN - else: - self._universe_domain = universe_domain + self._universe_domain = universe_domain or _DEFAULT_UNIVERSE_DOMAIN if universe_domain != _DEFAULT_UNIVERSE_DOMAIN: self._always_use_jwt_access = True