-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,7 +162,7 @@ public void deleteUserFromTenantTest() throws Exception { | |
result.process.main, | ||
"[email protected]", | ||
"password" | ||
).id; | ||
).getSupertokensUserId(); | ||
|
||
// Iterate over all both tenants and enable the same set of factors for the same user ID | ||
for (TenantIdentifierWithStorage tid : new TenantIdentifierWithStorage[]{publicTenant, privateTenant}) { | ||
|
@@ -177,7 +177,7 @@ public void deleteUserFromTenantTest() throws Exception { | |
assert mfaStorage.listFactors(privateTenant, userId).length == 0; | ||
assert mfaStorage.listFactors(publicTenant, userId).length == 2; | ||
|
||
String userEmail = EmailPassword.signIn(privateTenant, result.process.main, "[email protected]", "password").email; | ||
String userEmail = EmailPassword.signIn(privateTenant, result.process.main, "[email protected]", "password").loginMethods[0].email; | ||
assert userEmail.equals("[email protected]"); // Use should still exist in the private tenant since we have only disabled MFA related info | ||
|
||
// Deleting from non existent user should return false: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,8 @@ | |
import com.google.gson.JsonObject; | ||
import io.supertokens.Main; | ||
import io.supertokens.emailpassword.EmailPassword; | ||
import io.supertokens.pluginInterface.emailpassword.UserInfo; | ||
|
||
import io.supertokens.pluginInterface.authRecipe.AuthRecipeUserInfo; | ||
import io.supertokens.test.mfa.MfaTestBase; | ||
import io.supertokens.useridmapping.UserIdMapping; | ||
import org.junit.Test; | ||
|
@@ -33,8 +34,8 @@ public void testExternalUserIdTranslation() throws Exception { | |
Main main = result.process.getProcess(); | ||
|
||
JsonObject body = new JsonObject(); | ||
UserInfo user = EmailPassword.signUp(main, "[email protected]", "testPass123"); | ||
String superTokensUserId = user.id; | ||
AuthRecipeUserInfo user = EmailPassword.signUp(main, "[email protected]", "testPass123"); | ||
String superTokensUserId = user.getSupertokensUserId(); | ||
String externalUserId = "external-user-id"; | ||
|
||
// Create user id mapping first: | ||
|