Skip to content

Commit 9c57fc1

Browse files
mbleighjoehan
andauthored
Specify user project for quota in Auth config fetch. (#6819)
* Specify user project for quota in Auth config fetch. * update too * eslint * changelog --------- Co-authored-by: joehan <joehanley@google.com>
1 parent 412fffb commit 9c57fc1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
- Added new commands for managing Firestore backups and restoring databases (#6778)
1+
- Added new commands for managing Firestore backups and restoring databases. (#6778)
2+
- Fixed quota attribution for Firebase Auth API calls. (#6819)

src/gcp/auth.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const apiClient = new Client({ urlPrefix: identityOrigin, auth: true });
1111
export async function getAuthDomains(project: string): Promise<string[]> {
1212
const res = await apiClient.get<{ authorizedDomains: string[] }>(
1313
`/admin/v2/projects/${project}/config`,
14+
{ headers: { "x-goog-user-project": project } },
1415
);
1516
return res.body.authorizedDomains;
1617
}
@@ -28,7 +29,10 @@ export async function updateAuthDomains(project: string, authDomains: string[]):
2829
>(
2930
`/admin/v2/projects/${project}/config`,
3031
{ authorizedDomains: authDomains },
31-
{ queryParams: { update_mask: "authorizedDomains" } },
32+
{
33+
queryParams: { update_mask: "authorizedDomains" },
34+
headers: { "x-goog-user-project": project },
35+
},
3236
);
3337
return res.body.authorizedDomains;
3438
}

0 commit comments

Comments
 (0)