From 9e6d8195ebd24a3a0e1a55a3c37e8211fd467f37 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 5 Apr 2023 18:26:04 +0000 Subject: [PATCH] scope is a list, not str --- src/gam/__init__.py | 2 +- src/gam/auth/signjwt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 511da47b..7165a6a9 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -7963,7 +7963,7 @@ def create_signjwt_serviceaccount(): 'token_uri': 'https://oauth2.googleapis.com/token' } try: - creds, sa_info['project_id'] = google.auth.default(scopes='https://www.googleapis.com/auth/iam') + creds, sa_info['project_id'] = google.auth.default(scopes=['https://www.googleapis.com/auth/iam']) except google.auth.exceptions.DefaultCredentialsError as e: controlflow.system_error_exit(2, e) request = transport.create_request() diff --git a/src/gam/auth/signjwt.py b/src/gam/auth/signjwt.py index fcc8f56a..84b2d841 100644 --- a/src/gam/auth/signjwt.py +++ b/src/gam/auth/signjwt.py @@ -75,7 +75,7 @@ class SignJwt(google.auth.crypt.Signer): ''' Call IAM Credentials SignJWT API to get our signed JWT ''' request = transport.create_request() try: - credentials, _ = google.auth.default(scopes='https://www.googleapis.com/auth/iam', + credentials, _ = google.auth.default(scopes=['https://www.googleapis.com/auth/iam'], request=request) except google.auth.exceptions.DefaultCredentialsError as e: controlflow.system_error_exit(2, e)