Skip to content

Commit

Permalink
fix: pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed May 7, 2024
1 parent 7f2a091 commit 0673de5
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,22 +394,6 @@ null, true, null, new JsonObject()
createdNew = true;
}

if (getVersionFromRequest(req).greaterThanOrEqualTo(SemVer.v5_1)) {
// if using first factors as a way to enable/disable recipes but the tenant was already created using an
// old CDI, we automatically enable the recipes to make things work seamlessly
if (hasFirstFactors && firstFactors != null) {
if (List.of(firstFactors).contains("emailpassword") && emailPasswordEnabled == null) {
emailPasswordEnabled = true;
}
if (List.of(firstFactors).contains("thirdparty") && thirdPartyEnabled == null) {
thirdPartyEnabled = true;
}
if ((List.of(firstFactors).contains("otp-email") || List.of(firstFactors).contains("otp-phone") || List.of(firstFactors).contains("link-email") || List.of(firstFactors).contains("link-phone")) && passwordlessEnabled == null) {
passwordlessEnabled = true;
}
}
}

if (emailPasswordEnabled != null) {
tenantConfig = new TenantConfig(
tenantConfig.tenantIdentifier,
Expand Down

0 comments on commit 0673de5

Please sign in to comment.