@mesob/auth-hono 0.4.0 → 0.4.2

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.
@@ -1,7 +1,7 @@
1
1
  import * as hono from 'hono';
2
2
  import { OpenAPIHono } from '@hono/zod-openapi';
3
3
  import { PermissionTree } from '@mesob/common';
4
- import { D as Database } from './index-zShda6U3.js';
4
+ import { D as Database } from './index-Cb7JZobZ.js';
5
5
 
6
6
  type SessionStatus = 'valid' | 'no_cookie' | 'invalid_session' | 'user_not_found' | 'error';
7
7
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { A as AuthConfig, M as MesobAuth } from './index-CKOeabpa.js';
2
- export { a as SendInvitationParams, b as SendVerificationOTPParams, c as Session, S as SessionStatus, U as User } from './index-CKOeabpa.js';
3
- import { D as Database } from './index-zShda6U3.js';
4
- export { c as createDatabase } from './index-zShda6U3.js';
1
+ import { A as AuthConfig, M as MesobAuth } from './index-BNJj_z2x.js';
2
+ export { a as SendInvitationParams, b as SendVerificationOTPParams, c as Session, S as SessionStatus, U as User } from './index-BNJj_z2x.js';
3
+ import { D as Database } from './index-Cb7JZobZ.js';
4
+ export { c as createDatabase } from './index-Cb7JZobZ.js';
5
5
  export { cleanupExpiredData, cleanupExpiredSessions, cleanupExpiredVerifications } from './lib/cleanup.js';
6
6
  export { hasPermission, hasPermissionThrow, hasRole, hasRoleThrow } from './lib/has-role-permission.js';
7
7
  import * as hono from 'hono';
package/dist/index.js CHANGED
@@ -1706,7 +1706,7 @@ var signInHandler = (
1706
1706
  eq9(accountsInIam.provider, "credentials")
1707
1707
  )
1708
1708
  ).limit(1);
1709
- if (!(user.hasPassword && account?.password)) {
1709
+ if (!account?.password) {
1710
1710
  logger2.log("[sign-in] 401: no credentials account", { userId: user.id });
1711
1711
  return c.json({ error: AUTH_ERRORS.HAS_NO_PASSWORD }, 401);
1712
1712
  }