Skip to content

Commit 74e6acf

Browse files
committed
fix: fix test
1 parent 6795b70 commit 74e6acf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/io/supertokens/storage/postgresql/queries/WebAuthNQueries.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ public static Collection<? extends LoginMethod> getUsersInfoUsingIdList_Transact
461461
"LEFT JOIN " + credentialTable + " as credentials ON webauthn.user_id = credentials.user_id " +
462462
"LEFT JOIN " + userIdMappingTable + " as user_id_mapping ON webauthn.user_id = user_id_mapping.supertokens_user_id " +
463463
"LEFT JOIN " + emailVerificationTable + " as email_verification ON webauthn.app_id = " +
464-
"email_verification.app_id AND user_id_mapping.external_user_id = email_verification.user_id OR user_id_mapping.supertokens_user_id = email_verification.user_id OR webauthn.user_id = email_verification.user_id " +
464+
"email_verification.app_id AND (user_id_mapping.external_user_id = email_verification.user_id OR user_id_mapping.supertokens_user_id = email_verification.user_id OR webauthn.user_id = email_verification.user_id OR webauthn.user_id = email_verification.user_id) " +
465+
" AND email_verification.email = webauthn.email " +
465466
"WHERE webauthn.app_id = ? AND webauthn.user_id IN (" + Utils.generateCommaSeperatedQuestionMarks(ids.size()) + ")";
466467

467468
return execute(connection, queryAll, pst -> {
@@ -508,8 +509,8 @@ public static AuthRecipeUserInfo getUserInfoByCredentialId_Transaction(Start sta
508509
"JOIN " + getConfig(start).getUsersTable() + " as all_users ON webauthn.app_id = all_users.app_id AND webauthn.user_id = all_users.user_id " +
509510
"LEFT JOIN " + getConfig(start).getWebAuthNCredentialsTable() + " as credentials ON webauthn.user_id = credentials.user_id " +
510511
"LEFT JOIN " + getConfig(start).getUserIdMappingTable() + " as user_id_mapping ON webauthn.user_id = user_id_mapping.supertokens_user_id " +
511-
"LEFT JOIN " + getConfig(start).getEmailVerificationTable() + " as email_verification ON webauthn" +
512-
".app_id = email_verification.app_id AND user_id_mapping.external_user_id = email_verification.user_id OR user_id_mapping.supertokens_user_id = email_verification.user_id OR webauthn.user_id = email_verification.user_id " +
512+
"LEFT JOIN " + getConfig(start).getEmailVerificationTable() + " as email_verification ON webauthn.app_id = email_verification.app_id AND (user_id_mapping.external_user_id = email_verification.user_id OR user_id_mapping.supertokens_user_id = email_verification.user_id OR webauthn.user_id = email_verification.user_id OR webauthn.user_id = email_verification.user_id) " +
513+
" AND email_verification.email = webauthn.email " +
513514
"WHERE webauthn.app_id = ? AND credentials.id = ?";
514515

515516
return execute(sqlCon, QUERY, pst -> {

0 commit comments

Comments
 (0)