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

fix: Make ADC + human account work with firebase-admin #2553

Merged
merged 4 commits into from
Jun 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/utils/api-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,11 @@
const authHeader = 'Authorization';
requestCopy.headers[authHeader] = `Bearer ${token}`;

// Fix issue where firebase-admin does not specify quota project that is necessary for use when utilizing human account with ADC

Check failure on line 821 in src/utils/api-request.ts

View workflow job for this annotation

GitHub Actions / build (14.x)

This line has a length of 134. Maximum allowed is 120

Check failure on line 821 in src/utils/api-request.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

This line has a length of 134. Maximum allowed is 120
if (!requestCopy.headers['x-goog-user-project'] && this.app.options.projectId) {
requestCopy.headers['x-goog-user-project'] = this.app.options.projectId
}

if (!requestCopy.httpAgent && this.app.options.httpAgent) {
requestCopy.httpAgent = this.app.options.httpAgent;
}
Expand Down
Loading