diff --git a/google/cloud/firestore_v1/base_client.py b/google/cloud/firestore_v1/base_client.py index 17068a974..73dfc0359 100644 --- a/google/cloud/firestore_v1/base_client.py +++ b/google/cloud/firestore_v1/base_client.py @@ -180,7 +180,10 @@ def _emulator_channel(self, transport): # https://github.com/googleapis/python-firestore/issues/359 # Default the token to a non-empty string, in this case "owner". token = "owner" - if self._credentials is not None and self._credentials.id_token is not None: + if ( + self._credentials is not None + and getattr(self._credentials, "id_token", None) is not None + ): token = self._credentials.id_token options = [("Authorization", f"Bearer {token}")]