You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "credentials_repo.py", line 9, in <module>
credentials.refresh(request)
File "/usr/local/lib/python2.7/dist-packages/google/oauth2/service_account.py", line 322, in refresh
request, self._token_uri, assertion)
File "/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py", line 144, in jwt_grant
response_data = _token_endpoint_request(request, token_uri, body)
File "/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py", line 110, in _token_endpoint_request
_handle_error_response(response_body)
File "/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py", line 60, in _handle_error_response
error_details, response_body)
google.auth.exceptions.RefreshError: ('invalid_scope: Empty or missing scope not allowed.', u'{\n "error" : "invalid_scope",\n "error_description" : "Empty or missing scope not allowed."\n}')
Do scopes need to be explicitly set when using service accounts?
WDYT about failing the request locally rather than relying on the backend?
I would rather not have that logic on the client side, as it's not strictly required. It's possible for an authorization server to grant a token without scopes.
I'm using a service account and setting the environment variable GOOGLE_APPLICATION_CREDENTIALS and getting an error complaining about missing scope.
Here's some simple code to reproduce it.
This throws an exception
Do scopes need to be explicitly set when using service accounts?
I'm using google-auth 1.2.1
The text was updated successfully, but these errors were encountered: