@mesob/auth-hono 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1059,10 +1059,10 @@ var checkAccountHandler = async (c) => {
1059
1059
  hasPassword: sql4`exists(
1060
1060
  select 1
1061
1061
  from ${accountsInIam}
1062
- where ${accountsInIam.tenantId} = ${resolvedTenantId}
1063
- and ${accountsInIam.userId} = ${usersInIam.id}
1064
- and ${accountsInIam.provider} = 'credentials'
1065
- and ${accountsInIam.password} is not null
1062
+ where ${eq5(accountsInIam.tenantId, resolvedTenantId)}
1063
+ and ${eq5(accountsInIam.userId, usersInIam.id)}
1064
+ and ${eq5(accountsInIam.provider, "credentials")}
1065
+ and ${sql4`${accountsInIam.password} is not null`}
1066
1066
  )`
1067
1067
  }).from(usersInIam).where(whereClause).limit(1);
1068
1068
  const verified = result?.verified ?? false;
@@ -1419,10 +1419,10 @@ var fetchUserForLogin = async ({
1419
1419
  hasPassword: sql6`exists(
1420
1420
  select 1
1421
1421
  from ${accountsInIam}
1422
- where ${accountsInIam.tenantId} = ${tenantId}
1423
- and ${accountsInIam.userId} = ${usersInIam.id}
1424
- and ${accountsInIam.provider} = 'credentials'
1425
- and ${accountsInIam.password} is not null
1422
+ where ${eq7(accountsInIam.tenantId, tenantId)}
1423
+ and ${eq7(accountsInIam.userId, usersInIam.id)}
1424
+ and ${eq7(accountsInIam.provider, "credentials")}
1425
+ and ${sql6`${accountsInIam.password} is not null`}
1426
1426
  )`
1427
1427
  }).from(usersInIam).where(whereClause).limit(1);
1428
1428
  return row || null;