You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StringQUERY = "SELECT DISTINCT all_users.primary_or_recipe_user_id AS user_id "
402
-
+ "FROM " + getConfig(start).getWebAuthNUserToTenantTable() + " AS ep" +
408
+
+ "FROM " + getConfig(start).getWebAuthNUserToTenantTable() + " AS webauthn" +
403
409
" JOIN " + getConfig(start).getUsersTable() + " AS all_users" +
404
-
" ON ep.app_id = all_users.app_id AND ep.user_id = all_users.user_id" +
405
-
" WHERE ep.app_id = ? AND ep.email = ?";
410
+
" ON webauthn.app_id = all_users.app_id AND webauthn.user_id = all_users.user_id" +
411
+
" WHERE webauthn.app_id = ? AND webauthn.email = ?";
406
412
407
413
returnexecute(sqlConnection, QUERY, pst -> {
408
414
pst.setString(1, appIdentifier.getAppId());
@@ -448,7 +454,8 @@ public static Collection<? extends LoginMethod> getUsersInfoUsingIdList_Transact
448
454
"JOIN " + usersTable + " as all_users ON webauthn.app_id = all_users.app_id AND webauthn.user_id = all_users.user_id " +
449
455
"LEFT JOIN " + credentialTable + " as credentials ON webauthn.user_id = credentials.user_id " +
450
456
"LEFT JOIN " + userIdMappingTable + " as user_id_mapping ON webauthn.user_id = user_id_mapping.supertokens_user_id " +
451
-
"LEFT JOIN " + emailVerificationTable + " 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 " +
457
+
"LEFT JOIN " + emailVerificationTable + " as email_verification ON webauthn.app_id = " +
458
+
"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 " +
452
459
"WHERE webauthn.app_id = ? AND webauthn.user_id IN (" + Utils.generateCommaSeperatedQuestionMarks(ids.size()) + ")";
453
460
454
461
returnexecute(connection, queryAll, pst -> {
@@ -495,7 +502,8 @@ public static AuthRecipeUserInfo getUserInfoByCredentialId_Transaction(Start sta
495
502
"JOIN " + getConfig(start).getUsersTable() + " as all_users ON webauthn.app_id = all_users.app_id AND webauthn.user_id = all_users.user_id " +
496
503
"LEFT JOIN " + getConfig(start).getWebAuthNCredentialsTable() + " as credentials ON webauthn.user_id = credentials.user_id " +
497
504
"LEFT JOIN " + getConfig(start).getUserIdMappingTable() + " as user_id_mapping ON webauthn.user_id = user_id_mapping.supertokens_user_id " +
498
-
"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 " +
505
+
"LEFT JOIN " + getConfig(start).getEmailVerificationTable() + " as email_verification ON webauthn" +
506
+
".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 " +
499
507
"WHERE webauthn.app_id = ? AND credentials.id = ?";
0 commit comments