Skip to content

Commit 27203cd

Browse files
committed
fixes test server for e2e tests
1 parent 0ac098e commit 27203cd

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/server/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,18 @@ app.get("/token", async (_, res) => {
386386

387387
app.post("/setupTenant", async (req, res) => {
388388
const { tenantId, loginMethods, coreConfig } = req.body;
389+
let firstFactors = [];
390+
if (loginMethods.emailPassword?.enabled === true) {
391+
firstFactors.push("emailpassword");
392+
}
393+
if (loginMethods.passwordless?.enabled === true) {
394+
firstFactors.push("otp-phone", "otp-email", "link-phone", "link-email");
395+
}
396+
if (loginMethods.thirdParty?.enabled === true) {
397+
firstFactors.push("thirdparty");
398+
}
389399
let coreResp = await Multitenancy.createOrUpdateTenant(tenantId, {
390-
emailPasswordEnabled: loginMethods.emailPassword?.enabled === true,
391-
thirdPartyEnabled: loginMethods.thirdParty?.enabled === true,
392-
passwordlessEnabled: loginMethods.passwordless?.enabled === true,
400+
firstFactors,
393401
coreConfig,
394402
});
395403

0 commit comments

Comments
 (0)