Argument password is missing. #109

Closed
opened 2026-03-13 07:33:52 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @saidMounaim on GitHub (Oct 20, 2024).

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). 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"); }, }, }); } ```
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.

@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"

@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.

@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

@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#109