Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Fixed quota attribution for Firebase Auth API calls.
Comment thread
joehan marked this conversation as resolved.
Outdated
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;
}