Skip to content

Commit a55904d

Browse files
authored
Query fix (#839)
* fix: query fix * fix: passwordless issue
1 parent 80b9691 commit a55904d

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
66
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [7.0.4] - 2023-10-12
9+
10+
- Fixes user info from primary user id query
11+
- Fixes `deviceIdHash` issue
12+
813
## [7.0.3] - 2023-10-11
914

1015
- Fixes issue with duplicate cron task

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ compileTestJava { options.encoding = "UTF-8" }
1919
// }
2020
//}
2121

22-
version = "7.0.3"
22+
version = "7.0.4"
2323

2424

2525
repositories {

src/main/java/io/supertokens/inmemorydb/queries/GeneralQueries.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ private static List<AuthRecipeUserInfo> getPrimaryUserInfoForUserIds(Start start
11811181
" WHERE au.primary_or_recipe_user_id IN (SELECT primary_or_recipe_user_id FROM " +
11821182
getConfig(start).getAppIdToUserIdTable() + " WHERE (user_id IN ("
11831183
+ Utils.generateCommaSeperatedQuestionMarks(userIds.size()) +
1184-
") OR au.primary_or_recipe_user_id IN (" +
1184+
") OR primary_or_recipe_user_id IN (" +
11851185
Utils.generateCommaSeperatedQuestionMarks(userIds.size()) +
11861186
")) AND app_id = ?) AND au.app_id = ?";
11871187

@@ -1273,7 +1273,7 @@ private static List<AuthRecipeUserInfo> getPrimaryUserInfoForUserIds_Transaction
12731273
" WHERE au.primary_or_recipe_user_id IN (SELECT primary_or_recipe_user_id FROM " +
12741274
getConfig(start).getAppIdToUserIdTable() + " WHERE (user_id IN ("
12751275
+ Utils.generateCommaSeperatedQuestionMarks(userIds.size()) +
1276-
") OR au.primary_or_recipe_user_id IN (" +
1276+
") OR primary_or_recipe_user_id IN (" +
12771277
Utils.generateCommaSeperatedQuestionMarks(userIds.size()) +
12781278
")) AND app_id = ?) AND au.app_id = ?";
12791279

src/main/java/io/supertokens/inmemorydb/queries/PasswordlessQueries.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ private static PasswordlessDeviceRowMapper getInstance() {
10931093

10941094
@Override
10951095
public PasswordlessDevice map(ResultSet result) throws Exception {
1096-
return new PasswordlessDevice(result.getString("device_id_hash"), result.getString("email"),
1096+
return new PasswordlessDevice(result.getString("device_id_hash").trim(), result.getString("email"),
10971097
result.getString("phone_number"), result.getString("link_code_salt"),
10981098
result.getInt("failed_attempts"));
10991099
}
@@ -1111,7 +1111,7 @@ private static PasswordlessCodeRowMapper getInstance() {
11111111

11121112
@Override
11131113
public PasswordlessCode map(ResultSet result) throws Exception {
1114-
return new PasswordlessCode(result.getString("code_id"), result.getString("device_id_hash"),
1114+
return new PasswordlessCode(result.getString("code_id"), result.getString("device_id_hash").trim(),
11151115
result.getString("link_code_hash"), result.getLong("created_at"));
11161116
}
11171117
}

0 commit comments

Comments
 (0)