Error when updating account password with adapter prisma #242

Closed
opened 2026-03-13 07:39:22 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @davidroulier on GitHub (Nov 18, 2024).

Describe the bug
When calling the resetPassword method from the authClient (react client) and using the Prisma adapter, I've an error saying the id field is missing from the where clause.

To Reproduce

My auth config :

database: prismaAdapter(db, { provider: "postgresql" }),

Using the better-auth/react client

const { error: err } = await authClient.resetPassword({ newPassword });

Other infos
Node version : 20.11
Better-auth version : 0.8.6-beta.3

Screenshots
Capture d’écran 2024-11-18 à 13 18 30

Originally created by @davidroulier on GitHub (Nov 18, 2024). **Describe the bug** When calling the resetPassword method from the authClient (react client) and using the Prisma adapter, I've an error saying the `id` field is missing from the where clause. **To Reproduce** My auth config : ``` database: prismaAdapter(db, { provider: "postgresql" }), ``` Using the `better-auth/react` client ``` const { error: err } = await authClient.resetPassword({ newPassword }); ``` **Other infos** Node version : `20.11` Better-auth version : `0.8.6-beta.3` **Screenshots** ![Capture d’écran 2024-11-18 à 13 18 30](https://github.com/user-attachments/assets/a1a89b3e-ee05-47d4-b14b-e1ba3d22b858)
Author
Owner

@Bekacru commented on GitHub (Nov 18, 2024):

should be fixed on 0.8.7-beta.1

@Bekacru commented on GitHub (Nov 18, 2024): should be fixed on `0.8.7-beta.1`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#242