From f70592046d8f1b6d559f7fa247211af7a1758ac4 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Mon, 25 Dec 2023 14:36:11 +0530 Subject: [PATCH] fix: mfa changes (#87) --- .../storage/mysql/config/MySQLConfig.java | 4 +- .../storage/mysql/queries/GeneralQueries.java | 9 +---- .../mysql/queries/MultitenancyQueries.java | 26 ++++-------- .../queries/multitenancy/MfaSqlHelper.java | 18 ++++----- .../multitenancy/TenantConfigSQLHelper.java | 32 ++++++--------- .../storage/mysql/test/LoggingTest.java | 2 +- .../test/multitenancy/StorageLayerTest.java | 40 +++++++++---------- .../TestUserPoolIdChangeBehaviour.java | 8 ++-- 8 files changed, 57 insertions(+), 82 deletions(-) diff --git a/src/main/java/io/supertokens/storage/mysql/config/MySQLConfig.java b/src/main/java/io/supertokens/storage/mysql/config/MySQLConfig.java index c069668..4ac4af3 100644 --- a/src/main/java/io/supertokens/storage/mysql/config/MySQLConfig.java +++ b/src/main/java/io/supertokens/storage/mysql/config/MySQLConfig.java @@ -180,8 +180,8 @@ public String getTenantFirstFactorsTable() { return addPrefixToTableName("tenant_first_factors"); } - public String getTenantDefaultRequiredFactorIdsTable() { - return addPrefixToTableName("tenant_default_required_factor_ids"); + public String getTenantRequiredSecondaryFactorsTable() { + return addPrefixToTableName("tenant_required_secondary_factors"); } public String getTenantThirdPartyProvidersTable() { diff --git a/src/main/java/io/supertokens/storage/mysql/queries/GeneralQueries.java b/src/main/java/io/supertokens/storage/mysql/queries/GeneralQueries.java index fcf86a1..8e16b12 100644 --- a/src/main/java/io/supertokens/storage/mysql/queries/GeneralQueries.java +++ b/src/main/java/io/supertokens/storage/mysql/queries/GeneralQueries.java @@ -268,14 +268,9 @@ public static void createTablesIfNotExists(Start start) throws SQLException, Sto update(start, MultitenancyQueries.getQueryToCreateFirstFactorsTable(start), NO_OP_SETTER); } - if (!doesTableExists(start, Config.getConfig(start).getTenantDefaultRequiredFactorIdsTable())) { + if (!doesTableExists(start, Config.getConfig(start).getTenantRequiredSecondaryFactorsTable())) { getInstance(start).addState(CREATING_NEW_TABLE, null); - update(start, MultitenancyQueries.getQueryToCreateDefaultRequiredFactorIdsTable(start), NO_OP_SETTER); - - // index - update(start, - MultitenancyQueries.getQueryToCreateOrderIndexForDefaultRequiredFactorIdsTable(start), - NO_OP_SETTER); + update(start, MultitenancyQueries.getQueryToCreateRequiredSecondaryFactorsTable(start), NO_OP_SETTER); } if (!doesTableExists(start, Config.getConfig(start).getTenantThirdPartyProvidersTable())) { diff --git a/src/main/java/io/supertokens/storage/mysql/queries/MultitenancyQueries.java b/src/main/java/io/supertokens/storage/mysql/queries/MultitenancyQueries.java index 9924377..53923d1 100644 --- a/src/main/java/io/supertokens/storage/mysql/queries/MultitenancyQueries.java +++ b/src/main/java/io/supertokens/storage/mysql/queries/MultitenancyQueries.java @@ -52,9 +52,6 @@ static String getQueryToCreateTenantConfigsTable(Start start) { + "email_password_enabled BOOLEAN," + "passwordless_enabled BOOLEAN," + "third_party_enabled BOOLEAN," - + "totp_enabled BOOLEAN," - + "has_first_factors BOOLEAN DEFAULT FALSE," - + "has_default_required_factor_ids BOOLEAN DEFAULT FALSE," + "PRIMARY KEY (connection_uri_domain, app_id, tenant_id)" + ");"; // @formatter:on @@ -126,28 +123,21 @@ public static String getQueryToCreateFirstFactorsTable(Start start) { // @formatter:on } - public static String getQueryToCreateDefaultRequiredFactorIdsTable(Start start) { - String tableName = Config.getConfig(start).getTenantDefaultRequiredFactorIdsTable(); + public static String getQueryToCreateRequiredSecondaryFactorsTable(Start start) { + String tableName = Config.getConfig(start).getTenantRequiredSecondaryFactorsTable(); // @formatter:off return "CREATE TABLE IF NOT EXISTS " + tableName + " (" + "connection_uri_domain VARCHAR(256) DEFAULT ''," + "app_id VARCHAR(64) DEFAULT 'public'," + "tenant_id VARCHAR(64) DEFAULT 'public'," + "factor_id VARCHAR(128)," - + "order_idx INTEGER NOT NULL," + "PRIMARY KEY (connection_uri_domain, app_id, tenant_id, factor_id)," + "FOREIGN KEY (connection_uri_domain, app_id, tenant_id)" - + " REFERENCES " + Config.getConfig(start).getTenantConfigsTable() + " (connection_uri_domain, app_id, tenant_id) ON DELETE CASCADE," - + " UNIQUE (connection_uri_domain, app_id, tenant_id, order_idx)" - + ");"; + + " REFERENCES " + Config.getConfig(start).getTenantConfigsTable() + + " (connection_uri_domain, app_id, tenant_id) ON DELETE CASCADE);"; // @formatter:on } - public static String getQueryToCreateOrderIndexForDefaultRequiredFactorIdsTable(Start start) { - return "CREATE INDEX tenant_default_required_factor_ids_order_idx_index ON " - + getConfig(start).getTenantDefaultRequiredFactorIdsTable() + " (order_idx ASC);"; - } - private static void executeCreateTenantQueries(Start start, Connection sqlCon, TenantConfig tenantConfig) throws SQLException, StorageTransactionLogicException, StorageQueryException { @@ -186,7 +176,7 @@ private static void executeCreateTenantQueries(Start start, Connection sqlCon, T } MfaSqlHelper.createFirstFactors(start, sqlCon, tenantConfig.tenantIdentifier, tenantConfig.firstFactors); - MfaSqlHelper.createDefaultRequiredFactorIds(start, sqlCon, tenantConfig.tenantIdentifier, tenantConfig.defaultRequiredFactorIds); + MfaSqlHelper.createRequiredSecondaryFactors(start, sqlCon, tenantConfig.tenantIdentifier, tenantConfig.requiredSecondaryFactors); } public static void createTenantConfig(Start start, TenantConfig tenantConfig) throws StorageQueryException, StorageTransactionLogicException { @@ -268,10 +258,10 @@ public static TenantConfig[] getAllTenants(Start start) throws StorageQueryExcep // Map (tenantIdentifier) -> firstFactors HashMap firstFactorsMap = MfaSqlHelper.selectAllFirstFactors(start); - // Map (tenantIdentifier) -> defaultRequiredFactorIds - HashMap defaultRequiredFactorIdsMap = MfaSqlHelper.selectAllDefaultRequiredFactorIds(start); + // Map (tenantIdentifier) -> requiredSecondaryFactors + HashMap requiredSecondaryFactorsMap = MfaSqlHelper.selectAllRequiredSecondaryFactors(start); - return TenantConfigSQLHelper.selectAll(start, providerMap, firstFactorsMap, defaultRequiredFactorIdsMap); + return TenantConfigSQLHelper.selectAll(start, providerMap, firstFactorsMap, requiredSecondaryFactorsMap); } catch (SQLException throwables) { throw new StorageQueryException(throwables); } diff --git a/src/main/java/io/supertokens/storage/mysql/queries/multitenancy/MfaSqlHelper.java b/src/main/java/io/supertokens/storage/mysql/queries/multitenancy/MfaSqlHelper.java index c101e09..9da3eb5 100644 --- a/src/main/java/io/supertokens/storage/mysql/queries/multitenancy/MfaSqlHelper.java +++ b/src/main/java/io/supertokens/storage/mysql/queries/multitenancy/MfaSqlHelper.java @@ -54,10 +54,10 @@ public static HashMap selectAllFirstFactors(Start st }); } - public static HashMap selectAllDefaultRequiredFactorIds(Start start) + public static HashMap selectAllRequiredSecondaryFactors(Start start) throws SQLException, StorageQueryException { - String QUERY = "SELECT connection_uri_domain, app_id, tenant_id, factor_id, order_idx FROM " - + getConfig(start).getTenantDefaultRequiredFactorIdsTable() + " ORDER BY order_idx ASC;"; + String QUERY = "SELECT connection_uri_domain, app_id, tenant_id, factor_id FROM " + + getConfig(start).getTenantRequiredSecondaryFactorsTable() + ";"; return execute(start, QUERY, pst -> {}, result -> { HashMap> defaultRequiredFactors = new HashMap<>(); @@ -97,24 +97,20 @@ public static void createFirstFactors(Start start, Connection sqlCon, TenantIden } } - public static void createDefaultRequiredFactorIds(Start start, Connection sqlCon, TenantIdentifier tenantIdentifier, String[] defaultRequiredFactorIds) + public static void createRequiredSecondaryFactors(Start start, Connection sqlCon, TenantIdentifier tenantIdentifier, String[] requiredSecondaryFactors) throws SQLException, StorageQueryException { - if (defaultRequiredFactorIds == null || defaultRequiredFactorIds.length == 0) { + if (requiredSecondaryFactors == null || requiredSecondaryFactors.length == 0) { return; } - String QUERY = "INSERT INTO " + getConfig(start).getTenantDefaultRequiredFactorIdsTable() + "(connection_uri_domain, app_id, tenant_id, factor_id, order_idx) VALUES (?, ?, ?, ?, ?);"; - int orderIdx = 0; - for (String factorId : defaultRequiredFactorIds) { - int finalOrderIdx = orderIdx; + String QUERY = "INSERT INTO " + getConfig(start).getTenantRequiredSecondaryFactorsTable() + "(connection_uri_domain, app_id, tenant_id, factor_id) VALUES (?, ?, ?, ?);"; + for (String factorId : requiredSecondaryFactors) { update(sqlCon, QUERY, pst -> { pst.setString(1, tenantIdentifier.getConnectionUriDomain()); pst.setString(2, tenantIdentifier.getAppId()); pst.setString(3, tenantIdentifier.getTenantId()); pst.setString(4, factorId); - pst.setInt(5, finalOrderIdx); }); - orderIdx++; } } } diff --git a/src/main/java/io/supertokens/storage/mysql/queries/multitenancy/TenantConfigSQLHelper.java b/src/main/java/io/supertokens/storage/mysql/queries/multitenancy/TenantConfigSQLHelper.java index d10adb2..af3931c 100644 --- a/src/main/java/io/supertokens/storage/mysql/queries/multitenancy/TenantConfigSQLHelper.java +++ b/src/main/java/io/supertokens/storage/mysql/queries/multitenancy/TenantConfigSQLHelper.java @@ -38,16 +38,16 @@ public class TenantConfigSQLHelper { public static class TenantConfigRowMapper implements RowMapper { ThirdPartyConfig.Provider[] providers; String[] firstFactors; - String[] defaultRequiredFactorIds; + String[] requiredSecondaryFactors; - private TenantConfigRowMapper(ThirdPartyConfig.Provider[] providers, String[] firstFactors, String[] defaultRequiredFactorIds) { + private TenantConfigRowMapper(ThirdPartyConfig.Provider[] providers, String[] firstFactors, String[] requiredSecondaryFactors) { this.providers = providers; this.firstFactors = firstFactors; - this.defaultRequiredFactorIds = defaultRequiredFactorIds; + this.requiredSecondaryFactors = requiredSecondaryFactors; } - public static TenantConfigRowMapper getInstance(ThirdPartyConfig.Provider[] providers, String[] firstFactors, String[] defaultRequiredFactorIds) { - return new TenantConfigRowMapper(providers, firstFactors, defaultRequiredFactorIds); + public static TenantConfigRowMapper getInstance(ThirdPartyConfig.Provider[] providers, String[] firstFactors, String[] requiredSecondaryFactors) { + return new TenantConfigRowMapper(providers, firstFactors, requiredSecondaryFactors); } @Override @@ -58,9 +58,8 @@ public TenantConfig map(ResultSet result) throws StorageQueryException { new EmailPasswordConfig(result.getBoolean("email_password_enabled")), new ThirdPartyConfig(result.getBoolean("third_party_enabled"), this.providers), new PasswordlessConfig(result.getBoolean("passwordless_enabled")), - new TotpConfig(result.getBoolean("totp_enabled")), - result.getBoolean("has_first_factors") ? firstFactors : null, - result.getBoolean("has_default_required_factor_ids") ? defaultRequiredFactorIds : null, + firstFactors.length == 0 ? null : firstFactors, + requiredSecondaryFactors.length == 0 ? null : requiredSecondaryFactors, JsonUtils.stringToJsonObject(result.getString("core_config")) ); } catch (Exception e) { @@ -69,11 +68,10 @@ public TenantConfig map(ResultSet result) throws StorageQueryException { } } - public static TenantConfig[] selectAll(Start start, HashMap> providerMap, HashMap firstFactorsMap, HashMap defaultRequiredFactorIdsMap) + public static TenantConfig[] selectAll(Start start, HashMap> providerMap, HashMap firstFactorsMap, HashMap requiredSecondaryFactorsMap) throws SQLException, StorageQueryException { String QUERY = "SELECT connection_uri_domain, app_id, tenant_id, core_config," - + " email_password_enabled, passwordless_enabled, third_party_enabled," - + " totp_enabled, has_first_factors, has_default_required_factor_ids FROM " + + " email_password_enabled, passwordless_enabled, third_party_enabled FROM " + getConfig(start).getTenantConfigsTable() + ";"; TenantConfig[] tenantConfigs = execute(start, QUERY, pst -> {}, result -> { @@ -86,9 +84,9 @@ public static TenantConfig[] selectAll(Start start, HashMap { @@ -116,9 +113,6 @@ public static void create(Start start, Connection sqlCon, TenantConfig tenantCon pst.setBoolean(5, tenantConfig.emailPasswordConfig.enabled); pst.setBoolean(6, tenantConfig.passwordlessConfig.enabled); pst.setBoolean(7, tenantConfig.thirdPartyConfig.enabled); - pst.setBoolean(8, tenantConfig.totpConfig.enabled); - pst.setBoolean(9, tenantConfig.firstFactors != null); - pst.setBoolean(10, tenantConfig.defaultRequiredFactorIds != null); }); } catch (StorageQueryException e) { throw new StorageTransactionLogicException(e); diff --git a/src/test/java/io/supertokens/storage/mysql/test/LoggingTest.java b/src/test/java/io/supertokens/storage/mysql/test/LoggingTest.java index 294e982..fdc2f95 100644 --- a/src/test/java/io/supertokens/storage/mysql/test/LoggingTest.java +++ b/src/test/java/io/supertokens/storage/mysql/test/LoggingTest.java @@ -283,7 +283,7 @@ public void confirmHikariLoggerClosedOnlyWhenProcessEnds() throws Exception { new EmailPasswordConfig(true), new ThirdPartyConfig(true, null), new PasswordlessConfig(true), - new TotpConfig(false), null, null, + null, null, config ), false); diff --git a/src/test/java/io/supertokens/storage/mysql/test/multitenancy/StorageLayerTest.java b/src/test/java/io/supertokens/storage/mysql/test/multitenancy/StorageLayerTest.java index 128e43c..f5f53ce 100644 --- a/src/test/java/io/supertokens/storage/mysql/test/multitenancy/StorageLayerTest.java +++ b/src/test/java/io/supertokens/storage/mysql/test/multitenancy/StorageLayerTest.java @@ -112,7 +112,7 @@ public void mergingTenantWithBaseConfigWorks() new TenantConfig(new TenantIdentifier("abc", null, null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -157,7 +157,7 @@ public void storageInstanceIsReusedAcrossTenants() new TenantConfig(new TenantIdentifier(null, "abc", null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -205,17 +205,17 @@ public void storageInstanceIsReusedAcrossTenantsComplex() new TenantConfig(new TenantIdentifier(null, "abc", null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig), new TenantConfig(new TenantIdentifier(null, "abc", "t1"), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig1), new TenantConfig(new TenantIdentifier(null, null, "t2"), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig1)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -280,7 +280,7 @@ public void mergingTenantWithBaseConfigWithInvalidConfigThrowsErrorWorks() new TenantConfig(new TenantIdentifier("abc", null, null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -314,7 +314,7 @@ public void mergingTenantWithBaseConfigWithConflictingConfigsThrowsError() new TenantConfig(new TenantIdentifier(null, "abc", null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -349,7 +349,7 @@ public void mergingDifferentConnectionPoolIdTenantWithBaseConfigWithConflictingC new TenantConfig(new TenantIdentifier(null, "abc", null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -385,7 +385,7 @@ public void mergingDifferentUserPoolIdTenantWithBaseConfigWithConflictingConfigs new TenantConfig(new TenantIdentifier("abc", null, null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -430,7 +430,7 @@ public void newStorageIsNotCreatedWhenSameTenantIsAdded() new TenantConfig(new TenantIdentifier(null, "abc", null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -478,7 +478,7 @@ public void testDifferentWaysToGetConfigBasedOnConnectionURIAndTenantId() tenants[0] = new TenantConfig(new TenantIdentifier("c1", null, null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig); } @@ -490,7 +490,7 @@ public void testDifferentWaysToGetConfigBasedOnConnectionURIAndTenantId() tenants[1] = new TenantConfig(new TenantIdentifier("c1", null, "t1"), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig); } @@ -500,7 +500,7 @@ public void testDifferentWaysToGetConfigBasedOnConnectionURIAndTenantId() tenants[2] = new TenantConfig(new TenantIdentifier(null, null, "t2"), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig); } @@ -510,7 +510,7 @@ public void testDifferentWaysToGetConfigBasedOnConnectionURIAndTenantId() tenants[3] = new TenantConfig(new TenantIdentifier(null, null, "t1"), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig); } @@ -572,7 +572,7 @@ public void multipleTenantsSameUserPoolAndConnectionPoolShouldWork() new TenantConfig(new TenantIdentifier(null, "abc", null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -608,7 +608,7 @@ public void multipleTenantsSameUserPoolAndDifferentConnectionPoolShouldWork() new TenantConfig(new TenantIdentifier(null, "abc", null), new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfig)}; Config.loadAllTenantConfig(process.getProcess(), tenants); @@ -648,7 +648,7 @@ public void testCreating50StorageLayersUsage() new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, config); try { Multitenancy.addNewOrUpdateAppOrTenant(process.getProcess(), new TenantIdentifier(null, null, null), @@ -702,7 +702,7 @@ public void testCantCreateTenantWithUnknownDb() new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfigJson); try { @@ -741,7 +741,7 @@ public void testTenantCreationAndThenDbDownDbThrowsErrorInRecipesAndDoesntAffect new EmailPasswordConfig(true), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfigJson); StorageLayer.getMultitenancyStorage(process.getProcess()).createTenant(tenantConfig); @@ -813,7 +813,7 @@ public void testBadPortWithNewTenantShouldNotCauseItToWaitInput() throws Excepti new EmailPasswordConfig(false), new ThirdPartyConfig(false, new ThirdPartyConfig.Provider[0]), new PasswordlessConfig(false), - new TotpConfig(false), null, null, + null, null, tenantConfigJson); try { diff --git a/src/test/java/io/supertokens/storage/mysql/test/multitenancy/TestUserPoolIdChangeBehaviour.java b/src/test/java/io/supertokens/storage/mysql/test/multitenancy/TestUserPoolIdChangeBehaviour.java index 162280f..b0afd4b 100644 --- a/src/test/java/io/supertokens/storage/mysql/test/multitenancy/TestUserPoolIdChangeBehaviour.java +++ b/src/test/java/io/supertokens/storage/mysql/test/multitenancy/TestUserPoolIdChangeBehaviour.java @@ -82,7 +82,7 @@ public void testUsersWorkAfterUserPoolIdChanges() throws Exception { new EmailPasswordConfig(true), new ThirdPartyConfig(true, null), new PasswordlessConfig(true), - new TotpConfig(false), null, null, + null, null, coreConfig ), false); @@ -100,7 +100,7 @@ public void testUsersWorkAfterUserPoolIdChanges() throws Exception { new EmailPasswordConfig(true), new ThirdPartyConfig(true, null), new PasswordlessConfig(true), - new TotpConfig(false), null, null, + null, null, coreConfig ), false); @@ -126,7 +126,7 @@ public void testUsersWorkAfterUserPoolIdChangesAndServerRestart() throws Excepti new EmailPasswordConfig(true), new ThirdPartyConfig(true, null), new PasswordlessConfig(true), - new TotpConfig(false), null, null, + null, null, coreConfig ), false); @@ -144,7 +144,7 @@ public void testUsersWorkAfterUserPoolIdChangesAndServerRestart() throws Excepti new EmailPasswordConfig(true), new ThirdPartyConfig(true, null), new PasswordlessConfig(true), - new TotpConfig(false), null, null, + null, null, coreConfig ), false);