[GH-ISSUE #262] Argument password is missing. #8193

Closed
opened 2026-04-13 03:17:59 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @saidMounaim on GitHub (Oct 20, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/262

After I set everything up, I tried to log in with email and password, but I got an error: 'Argument password is missing.' I checked the password in the console, and it looks fine. I'm using Prisma and Next.js

async function onSubmit(values: z.infer<typeof SignupFormSchema>) {
    const { name, email, password } = values;
    console.log(password);
    await authClient.signUp.email({
      email,
      password,
      name,
      image: "",
      fetchOptions: {
        onResponse: () => {
          setLoading(false);
        },
        onRequest: () => {
          setLoading(true);
        },
        onError: () => {
          alert("Something went wrong");
        },
      },
    });
  }
Originally created by @saidMounaim on GitHub (Oct 20, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/262 After I set everything up, I tried to log in with email and password, but I got an error: 'Argument password is missing.' I checked the password in the console, and it looks fine. I'm using Prisma and Next.js ``` async function onSubmit(values: z.infer<typeof SignupFormSchema>) { const { name, email, password } = values; console.log(password); await authClient.signUp.email({ email, password, name, image: "", fetchOptions: { onResponse: () => { setLoading(false); }, onRequest: () => { setLoading(true); }, onError: () => { alert("Something went wrong"); }, }, }); } ```
GiteaMirror added the locked label 2026-04-13 03:17:59 -05:00
Author
Owner

@GregorWedlich commented on GitHub (Oct 20, 2024):

I think your code is correct. Which version are you using and please try to format the code correctly with Markdown in the future, e.g. with three “ ```ts ” backticks and three at the end.

<!-- gh-comment-id:2425167302 --> @GregorWedlich commented on GitHub (Oct 20, 2024): I think your code is correct. Which version are you using and please try to format the code correctly with Markdown in the future, e.g. with three “ ```ts ” backticks and three at the end.
Author
Owner

@saidMounaim commented on GitHub (Oct 20, 2024):

this is the version,
better-auth": "^0.5.2-beta.12"

<!-- gh-comment-id:2425176902 --> @saidMounaim commented on GitHub (Oct 20, 2024): this is the version, `better-auth": "^0.5.2-beta.12"`
Author
Owner

@GregorWedlich commented on GitHub (Oct 20, 2024):

Sorry there seems to be something wrong with you, it works fine for me.

<!-- gh-comment-id:2425228920 --> @GregorWedlich commented on GitHub (Oct 20, 2024): Sorry there seems to be something wrong with you, it works fine for me.
Author
Owner

@Unyxos commented on GitHub (Nov 3, 2024):

hey @saidMounaim i had the same issue yesterday, what does your Prisma schema looks like ? I had a dummy User schema with password field and it broke the whole thing as password isn't saved in the user but in account

<!-- gh-comment-id:2453487660 --> @Unyxos commented on GitHub (Nov 3, 2024): hey @saidMounaim i had the same issue yesterday, what does your Prisma schema looks like ? I had a dummy User schema with password field and it broke the whole thing as password isn't saved in the user but in account
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8193