From 4fe694ac7d963e510798d4e27eb2ce591824d493 Mon Sep 17 00:00:00 2001 From: tamassoltesz Date: Wed, 27 Nov 2024 10:00:54 +0100 Subject: [PATCH] fix: fixing failing tests, changing version --- build.gradle | 2 +- src/main/java/io/supertokens/authRecipe/AuthRecipe.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c4779d56c..17e593dbc 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ compileTestJava { options.encoding = "UTF-8" } // } //} -version = "9.3.0" +version = "9.4.0" repositories { mavenCentral() diff --git a/src/main/java/io/supertokens/authRecipe/AuthRecipe.java b/src/main/java/io/supertokens/authRecipe/AuthRecipe.java index d8eb407ed..1b0da61a8 100644 --- a/src/main/java/io/supertokens/authRecipe/AuthRecipe.java +++ b/src/main/java/io/supertokens/authRecipe/AuthRecipe.java @@ -418,7 +418,8 @@ private static void checkIfLoginMethodCanBeLinkedOnTenant(TransactionConnection if (!userWithSameThirdParty.tenantIds.contains(tenantId)) { continue; } - if (userWithSameThirdParty.isPrimaryUser) { + if (userWithSameThirdParty.isPrimaryUser && + !userWithSameThirdParty.getSupertokensUserId().equals(primaryUser.getSupertokensUserId())) { throw new AccountInfoAlreadyAssociatedWithAnotherPrimaryUserIdException( userWithSameThirdParty.getSupertokensUserId(), "This user's third party login is already associated with another" +