diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b3547d1..633aa39d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.0.4] - 2023-11-28 + +- Removes the error `Please use a CDI version that is greater than the one in which account linking feature was enabled` while querying users with linked accounts, but from an older version of CDI. We return details of the oldest login method in this case. + ## [4.0.3] - 2023-11-10 - Adds function to update userId to externalUserId for email verification diff --git a/build.gradle b/build.gradle index bc1e6b18..59f32ce4 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java-library' } -version = "4.0.3" +version = "4.0.4" repositories { mavenCentral() diff --git a/src/main/java/io/supertokens/pluginInterface/authRecipe/AuthRecipeUserInfo.java b/src/main/java/io/supertokens/pluginInterface/authRecipe/AuthRecipeUserInfo.java index 7837391f..4fb54403 100644 --- a/src/main/java/io/supertokens/pluginInterface/authRecipe/AuthRecipeUserInfo.java +++ b/src/main/java/io/supertokens/pluginInterface/authRecipe/AuthRecipeUserInfo.java @@ -207,11 +207,12 @@ public JsonObject toJsonWithoutAccountLinking() { if (!didCallSetExternalUserId) { throw new RuntimeException("Found a bug: Did you forget to call setExternalUserId?"); } - // this is for older CDI versions. if (this.loginMethods.length != 1) { - throw new IllegalStateException( - "Please use a CDI version that is greater than the one in which account linking feature was " + - "enabled."); + // this is for older CDI versions. + // we are deliberately not throwing this exception to let the core work with older versions of CDI. + // throw new IllegalStateException( + // "Please use a CDI version that is greater than the one in which account linking feature was " + + // "enabled."); } LoginMethod loginMethod = loginMethods[0]; JsonObject jsonObject = new JsonObject();