Skip to content

Commit

Permalink
Merge branch '4.0' into feat/mfa
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Dec 21, 2023
2 parents 208e167 + 1933948 commit a24f17b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- TOTPSQLStorage interface changes
- Adds `getDeviceByName_Transaction` and `createDevice_Transaction` functions

## [4.0.5] - 2023-12-05

- Adds `InvalidConfigException` to throws list of `canBeUsed` function

## [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
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/io/supertokens/pluginInterface/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void setKeyValue(TenantIdentifier tenantIdentifier, String key, KeyValueInfo inf

void setStorageLayerEnabled(boolean enabled);

boolean canBeUsed(JsonObject configJson);
boolean canBeUsed(JsonObject configJson) throws InvalidConfigException;

// this function will be used in the createUserIdMapping and deleteUserIdMapping functions to check if the userId is
// being used in NonAuth recipes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a24f17b

Please sign in to comment.