iterative / iterative/PyDrive2
no support for `google.auth.default`
- Dominant language
- Python
- Stars
- 670
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
To support CI workflows building off gh actions, I'd like to use the recommended auth method using `google.auth.default` with `google-github-actions/auth@v0.4.0` - [https://github.com/google-github-actions/auth](https://github.com/google-github-actions/auth).
This would (hopefully) allow the following, using the more modern `google.auth` lib:
```
gauth = GoogleAuth()
try:
gauth.credentials = ServiceAccountCredentials.from_json_keyfile_name(LOCAL_KEY, SCOPES) # support local dev
except FileNotFoundError:
credentials, _ = google.auth.default(SCOPES) # prod
gauth.credentials = credentials
```
This is defined here:
[https://google-auth.readthedocs.io/en/master/user-guide.html](https://google-auth.readthedocs.io/en/master/user-guide.html)
Unfortunately forcing auth with a local service account key file is a poor security implementation, and not really acceptable for cloud CI.
Contributor guide
Assessment
This issue has not been assessed yet.