File tree Expand file tree Collapse file tree 3 files changed +4
-14
lines changed
Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -175,17 +175,7 @@ def __init__(self, refresh_token):
175175 if json_data .get ('type' ) != self ._CREDENTIAL_TYPE :
176176 raise ValueError ('Invalid refresh token configuration. JSON must contain a '
177177 '"type" field set to "{0}".' .format (self ._CREDENTIAL_TYPE ))
178- try :
179- client_id = json_data ['client_id' ]
180- client_secret = json_data ['client_secret' ]
181- refresh_token = json_data ['refresh_token' ]
182- except KeyError as error :
183- raise ValueError ('Failed to initialize a refresh token credential. '
184- 'Missing key: {0}' .format (error ))
185- self ._g_credential = credentials .Credentials (
186- token = None , refresh_token = refresh_token ,
187- token_uri = 'https://accounts.google.com/o/oauth2/token' ,
188- client_id = client_id , client_secret = client_secret , scopes = _scopes )
178+ self ._g_credential = credentials .Credentials .from_authorized_user_info (json_data , _scopes )
189179
190180 @property
191181 def client_id (self ):
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ pytest >= 3.0.6
33pytest-cov >= 2.4.0
44tox >= 2.6.0
55
6- google-auth >= 1.1 .0
6+ google-auth >= 1.3 .0
77google-cloud-firestore >= 0.27.0
88google-cloud-storage >= 1.2.0
99requests >= 2.13.0
Original file line number Diff line number Diff line change 3232long_description = ('The Firebase Admin Python SDK enables server-side (backend) Python developers '
3333 'to integrate Firebase into their services and applications.' )
3434install_requires = [
35- 'google-auth>=1.1 .0' ,
35+ 'google-auth>=1.3 .0' ,
3636 'google-cloud-firestore>=0.27.0' ,
37- 'google-cloud-storage>=1.2.0' ,
37+ 'google-cloud-storage>=1.2.0' ,
3838 'requests>=2.13.0' ,
3939 'six>=1.6.1'
4040]
You can’t perform that action at this time.
0 commit comments