googleapis / googleapis/google-cloud-node
feat: Provide Mechanism to Change AuthClient Scopes Uniformly
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
Today, we don't have a clean way to change AuthClient scopes uniformly between instances, and different AuthClients offer varying functionality like this:
https://github.com/googleapis/google-auth-library-nodejs/blob/6c0a6bdc156c1098b09e85e82cabadaa73e7367f/src/auth/jwtclient.ts#L100-L115
We should offer a uniform API for changing scopes for all AuthClients. Additionally, once this is implemented `GoogleAuth#scopes` should update its `cachedCredentials`'s scopes (perhaps via a simple getter/setter hook on `GoogleAuth` itself).
Dependencies:
- https://github.com/googleapis/google-auth-library-nodejs/pull/1663
- https://github.com/googleapis/google-cloud-node/issues/7732
Contributor guide
Assessment
This issue has not been assessed yet.