Skip to content

Commit d9ff20e

Browse files
authored
Swich tenant management service calls to the v2 endpoint. (#725)
1 parent 8104b90 commit d9ff20e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/auth/auth-api-request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ export class AuthRequestHandler extends AbstractAuthRequestHandler {
15121512
*/
15131513
constructor(app: FirebaseApp) {
15141514
super(app);
1515-
this.tenantMgmtResourceBuilder = new AuthResourceUrlBuilder(utils.getProjectId(app), 'v2beta1');
1515+
this.tenantMgmtResourceBuilder = new AuthResourceUrlBuilder(utils.getProjectId(app), 'v2');
15161516
}
15171517

15181518
/**

test/unit/auth/auth-api-request.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3544,7 +3544,7 @@ AUTH_REQUEST_HANDLER_TESTS.forEach((handler) => {
35443544

35453545
if (handler.supportsTenantManagement) {
35463546
describe('getTenant', () => {
3547-
const path = '/v2beta1/projects/project_id/tenants/tenant-id';
3547+
const path = '/v2/projects/project_id/tenants/tenant-id';
35483548
const method = 'GET';
35493549
const tenantId = 'tenant-id';
35503550
const expectedResult = utils.responseFrom({
@@ -3600,7 +3600,7 @@ AUTH_REQUEST_HANDLER_TESTS.forEach((handler) => {
36003600
});
36013601

36023602
describe('listTenants', () => {
3603-
const path = '/v2beta1/projects/project_id/tenants';
3603+
const path = '/v2/projects/project_id/tenants';
36043604
const method = 'GET';
36053605
const nextPageToken = 'PAGE_TOKEN';
36063606
const maxResults = 500;
@@ -3716,7 +3716,7 @@ AUTH_REQUEST_HANDLER_TESTS.forEach((handler) => {
37163716
});
37173717

37183718
describe('deleteTenant', () => {
3719-
const path = '/v2beta1/projects/project_id/tenants/tenant-id';
3719+
const path = '/v2/projects/project_id/tenants/tenant-id';
37203720
const method = 'DELETE';
37213721
const tenantId = 'tenant-id';
37223722
const expectedResult = utils.responseFrom({});
@@ -3770,7 +3770,7 @@ AUTH_REQUEST_HANDLER_TESTS.forEach((handler) => {
37703770
});
37713771

37723772
describe('createTenant', () => {
3773-
const path = '/v2beta1/projects/project_id/tenants';
3773+
const path = '/v2/projects/project_id/tenants';
37743774
const postMethod = 'POST';
37753775
const tenantOptions: TenantOptions = {
37763776
displayName: 'TENANT-DISPLAY-NAME',
@@ -3881,7 +3881,7 @@ AUTH_REQUEST_HANDLER_TESTS.forEach((handler) => {
38813881
});
38823882

38833883
describe('updateTenant', () => {
3884-
const path = '/v2beta1/projects/project_id/tenants/tenant-id';
3884+
const path = '/v2/projects/project_id/tenants/tenant-id';
38853885
const patchMethod = 'PATCH';
38863886
const tenantId = 'tenant-id';
38873887
const tenantOptions = {

0 commit comments

Comments
 (0)