Skip to content

Commit

Permalink
fix: remove con reuse (#116)
Browse files Browse the repository at this point in the history
* fix: tests

* fix: tenantIds instance
  • Loading branch information
sattvikc authored Sep 6, 2023
1 parent 8fa5dbb commit f42eddc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ AuthRecipeUserInfo[] listPrimaryUsersByEmail(TenantIdentifier tenantIdentifier,
AuthRecipeUserInfo[] listPrimaryUsersByPhoneNumber(TenantIdentifier tenantIdentifier, String phoneNumber)
throws StorageQueryException;

AuthRecipeUserInfo[] listPrimaryUsersByThirdPartyInfo(AppIdentifier appIdentifier, String thirdPartyId, String thirdPartyUserId)
throws StorageQueryException;

AuthRecipeUserInfo getPrimaryUserByThirdPartyInfo(TenantIdentifier tenantIdentifier, String thirdPartyId,
String thirdPartyUserId) throws StorageQueryException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
import com.google.gson.JsonPrimitive;
import io.supertokens.pluginInterface.RECIPE_ID;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.*;

public class AuthRecipeUserInfo {

Expand Down Expand Up @@ -70,7 +68,8 @@ protected AuthRecipeUserInfo(String id, Boolean isPrimaryUser, LoginMethod login
this.isPrimaryUser = isPrimaryUser;
this.loginMethods = new LoginMethod[]{loginMethods};
this.timeJoined = loginMethods.timeJoined;
this.tenantIds = loginMethods.tenantIds;
this.tenantIds = new HashSet<>();
this.tenantIds.addAll(loginMethods.tenantIds);
}

public static AuthRecipeUserInfo create(String id, Boolean isPrimaryUser, LoginMethod loginMethod) {
Expand Down

0 comments on commit f42eddc

Please sign in to comment.