diff --git a/google/oauth2/credentials.py b/google/oauth2/credentials.py index 4cb909cb6..9b5d1e628 100644 --- a/google/oauth2/credentials.py +++ b/google/oauth2/credentials.py @@ -165,7 +165,7 @@ def from_authorized_user_info(cls, info, scopes=None): 'Authorized user info was not in the expected format, missing ' 'fields {}.'.format(', '.join(missing))) - return Credentials( + return cls( None, # No access token, must be refreshed. refresh_token=info['refresh_token'], token_uri=_GOOGLE_OAUTH2_TOKEN_ENDPOINT,