Skip to content

Commit

Permalink
Specify user project for quota in Auth config fetch. (#6819)
Browse files Browse the repository at this point in the history
* Specify user project for quota in Auth config fetch.

* update too

* eslint

* changelog

---------

Co-authored-by: joehan <joehanley@google.com>
  • Loading branch information
mbleigh and joehan authored Feb 27, 2024
1 parent 412fffb commit 9c57fc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Added new commands for managing Firestore backups and restoring databases (#6778)
- Added new commands for managing Firestore backups and restoring databases. (#6778)
- Fixed quota attribution for Firebase Auth API calls. (#6819)
6 changes: 5 additions & 1 deletion src/gcp/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const apiClient = new Client({ urlPrefix: identityOrigin, auth: true });
export async function getAuthDomains(project: string): Promise<string[]> {
const res = await apiClient.get<{ authorizedDomains: string[] }>(
`/admin/v2/projects/${project}/config`,
{ headers: { "x-goog-user-project": project } },
);
return res.body.authorizedDomains;
}
Expand All @@ -28,7 +29,10 @@ export async function updateAuthDomains(project: string, authDomains: string[]):
>(
`/admin/v2/projects/${project}/config`,
{ authorizedDomains: authDomains },
{ queryParams: { update_mask: "authorizedDomains" } },
{
queryParams: { update_mask: "authorizedDomains" },
headers: { "x-goog-user-project": project },
},
);
return res.body.authorizedDomains;
}

0 comments on commit 9c57fc1

Please sign in to comment.