We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c60051d commit ad7e726Copy full SHA for ad7e726
pydrive2/auth.py
@@ -303,7 +303,14 @@ def ServiceAuth(self):
303
self.LoadServiceConfigSettings()
304
scopes = scopes_to_string(self.settings["oauth_scope"])
305
client_service_json = self.client_config.get("client_json_file_path")
306
- if client_service_json:
+ creds_dict = self.client_config.get("client_creds_dict")
307
+ if creds_dict:
308
+ self.credentials = (
309
+ ServiceAccountCredentials.from_json_keyfile_dict(
310
+ keyfile_dict=creds_dict, scopes=scopes
311
+ )
312
313
+ elif client_service_json:
314
self.credentials = (
315
ServiceAccountCredentials.from_json_keyfile_name(
316
filename=client_service_json, scopes=scopes
0 commit comments