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

feat: Support instantiating GoogleAuth with an AuthClient #1364

Merged
merged 10 commits into from Feb 17, 2022

Conversation

danielbankhead
Copy link
Member

This will allow downstream clients to support features like Downscoped Tokens without breaking changes

This will allow downstream clients to support features like Downscoped Tokens without breaking changes
@danielbankhead danielbankhead requested review from a team as code owners February 15, 2022 16:13
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation seems super clean, great work.

I'm always somewhat cautious with updates to the client library, perhaps you could link and run the storage sample/system tests against this branch? at which point let's ship.

return opts;
},
},
authClient: new GoogleAuth({auth: oauth2Client}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is much nicer.

// GCS object name.
const objectName = 'cab-first-z2zsauf4sj.txt';
const objectName = 'cab-first-"brd3qlsuok.txt';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why we changed this object name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question: The bucket and object previously didn’t exist - and the test has silently failed until this PR as we were asserting a string that existed in the error message (‘first’).

@bcoe bcoe merged commit 8839b5b into main Feb 17, 2022
@bcoe bcoe deleted the googleauth-authclient branch February 17, 2022 16:55
danielbankhead added a commit that referenced this pull request Feb 17, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants