Skip to content

Commit a9572dd

Browse files
committed
Modify mfaConfig default according to admin sdk integ tests
This is line is needed to avoid throwing an error on this line: https://github.com/firebase/firebase-admin-node/blob/83fbb6d3ebc2088206a8eb5956326b2198a254e4/src/auth/auth-config.ts#L613
1 parent ea806ec commit a9572dd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/emulator/auth/operations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,7 @@ function createTenant(
26992699
enableEmailLinkSignin: reqBody.enableEmailLinkSignin ?? false,
27002700
enableAnonymousUser: reqBody.enableAnonymousUser ?? false,
27012701
disableAuth: reqBody.disableAuth ?? false,
2702-
mfaConfig: reqBody.mfaConfig ?? {},
2702+
mfaConfig: reqBody.mfaConfig ?? { state: "DISABLED" },
27032703
tenantId: "", // Placeholder until one is generated
27042704
};
27052705

src/test/emulators/auth/tenant.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ describeAuthEmulator("tenant management", ({ authApi }) => {
5151
expect(res.body.disableAuth).to.be.false;
5252
expect(res.body.enableAnonymousUser).to.be.false;
5353
expect(res.body.enableEmailLinkSignin).to.be.false;
54-
expect(res.body.mfaConfig).to.eql({});
54+
expect(res.body.mfaConfig).to.eql({
55+
state: "DISABLED",
56+
});
5557
});
5658
});
5759
});

0 commit comments

Comments
 (0)