Skip to content

Commit 89beac0

Browse files
authored
Reading project_id directly from google creds (#98)
1 parent e9c78e2 commit 89beac0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

firebase_admin/credentials.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ def __init__(self, cert):
8888
if json_data.get('type') != self._CREDENTIAL_TYPE:
8989
raise ValueError('Invalid service account certificate. Certificate must contain a '
9090
'"type" field set to "{0}".'.format(self._CREDENTIAL_TYPE))
91-
self._project_id = json_data.get('project_id')
9291
try:
9392
self._g_credential = service_account.Credentials.from_service_account_info(
9493
json_data, scopes=_scopes)
@@ -98,7 +97,7 @@ def __init__(self, cert):
9897

9998
@property
10099
def project_id(self):
101-
return self._project_id
100+
return self._g_credential.project_id
102101

103102
@property
104103
def signer(self):

0 commit comments

Comments
 (0)