API Reference / modelence / server / dbUsers
const dbUsers: Store<{ authMethods: ZodObject<{ google: ZodOptional<ZodObject<{ id: ZodString; }, "strip", ZodTypeAny, { id: string; }, { id: string; }>>; password: ZodOptional<ZodObject<{ hash: ZodString; }, "strip", ZodTypeAny, { hash: string; }, { hash: string; }>>; }, "strip", ZodTypeAny, { google?: { id: string; }; password?: { hash: string; }; }, { google?: { id: string; }; password?: { hash: string; }; }>; createdAt: ZodDate; emails: ZodOptional<ZodArray<ZodObject<{ address: ZodString; verified: ZodBoolean; }, "strip", ZodTypeAny, { address: string; verified: boolean; }, { address: string; verified: boolean; }>, "many">>; handle: ZodString; }, Record<string, (this, …args) => any>>
Defined in: src/auth/db.ts:18 Database collection for storing user accounts with authentication methods and profile information. This is where signupWithPassword automatically creates new users.

Example

// Find user by email
const user = await dbUsers.findOne(
  { 'emails.address': 'john@example.com' }
);