Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace oauth2client with google-auth #71

Open
alanyee opened this issue May 27, 2019 · 0 comments
Open

Replace oauth2client with google-auth #71

alanyee opened this issue May 27, 2019 · 0 comments

Comments

@alanyee
Copy link
Contributor

alanyee commented May 27, 2019

Is your feature request related to a problem? Please describe.
oauth2client is deprecated. We should use its long-term replacement: https://github.com/googleapis/google-auth-library-python. Also this might fix #12

Describe the solution you'd like
https://developers.google.com/drive/api/v3/quickstart/python describes how https://github.com/googleapis/google-auth-library-python-oauthlib can replace oauth2client.

Describe alternatives you've considered
We can utilize having the credential file path be set via an environment variable via service_account.Credentials.from_service_account_file, or have the credential json string loaded explicitly via service_account.Credentials.from_service_account_info.

https://google-auth.readthedocs.io/en/latest/user-guide.html#service-account-private-key-files

Additional context
https://google-auth.readthedocs.io/en/latest/oauth2client-deprecation.html

This issue mostly affects how to migrate api.py. If we look at google_auth_oauthlib, for instance, credentials.invalid has been replaced by credentials.valid, client.flow_from_clientsecrets() is replaced by InstalledAppFlow.from_client_secrets_file(), tools.run_flow() is somewhat replaced by tools.run_console() and tools.run_local_server().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant