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):
175
175
if json_data .get ('type' ) != self ._CREDENTIAL_TYPE :
176
176
raise ValueError ('Invalid refresh token configuration. JSON must contain a '
177
177
'"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 )
189
179
190
180
@property
191
181
def client_id (self ):
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ pytest >= 3.0.6
3
3
pytest-cov >= 2.4.0
4
4
tox >= 2.6.0
5
5
6
- google-auth >= 1.1 .0
6
+ google-auth >= 1.3 .0
7
7
google-cloud-firestore >= 0.27.0
8
8
google-cloud-storage >= 1.2.0
9
9
requests >= 2.13.0
Original file line number Diff line number Diff line change 32
32
long_description = ('The Firebase Admin Python SDK enables server-side (backend) Python developers '
33
33
'to integrate Firebase into their services and applications.' )
34
34
install_requires = [
35
- 'google-auth>=1.1 .0' ,
35
+ 'google-auth>=1.3 .0' ,
36
36
'google-cloud-firestore>=0.27.0' ,
37
- 'google-cloud-storage>=1.2.0' ,
37
+ 'google-cloud-storage>=1.2.0' ,
38
38
'requests>=2.13.0' ,
39
39
'six>=1.6.1'
40
40
]
You can’t perform that action at this time.
0 commit comments