Use cls parameter instead of class (#341)
Use cls parameter instead of explicit `Credentials` reference to allow subclassing
diff --git a/google/oauth2/credentials.py b/google/oauth2/credentials.py
index b56e314..9e11416 100644
--- a/google/oauth2/credentials.py
+++ b/google/oauth2/credentials.py
@@ -179,7 +179,7 @@
'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,