googleapis / googleapis/google-cloud-node

feat: Provide Mechanism to Change AuthClient Scopes Uniformly

Open
#7,730 0 comments 1 reaction 0 assignees View on GitHub
library: google-cloud-node-core priority: p3 type: feature request
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.