Facing issue with sign up

I'm working on a nextjs app with prisma, database on hoted supabase. I'm trying to do a simple sign up flow, but am getting this error:

....database. If you haven't generated the Prisma client, you need to run 'npx prisma generate'`);
  7865 }
→ 7866 const result = await db[getModelName(model)].create({
         data: {
           id: "xkYF7mgMe4Jn8hGImGPoNTnw35A2LcIU",
           name: "",
           email: "asdadsadasas@asdas.com",
           emailVerified: false,
           createdAt: new Date("2025-03-10T07:50:35.758Z"),
           updatedAt: new Date("2025-03-10T07:50:35.758Z"),
       +   password: String
         },
         select: undefined
       })

Argument `password` is missing.] {
  clientVersion: '6.4.1'
}

Console error:
{message: 'Failed to create user', details: {…}, code: 'FAILED_TO_CREATE_USER', status: 422, statusText: 'UNPROCESSABLE_ENTITY'}
code
: 
"FAILED_TO_CREATE_USER"
details
: 
{name: 'PrismaClientValidationError', clientVersion: '6.4.1'}
message
: 
"Failed to create user"
status
: 
422
statusText
: 
"UNPROCESSABLE_ENTITY"
[[Prototype]]
: 
Object

My schema generation is done using prisma, and my table is created.

my auth.ts
import { betterAuth } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();
export const auth = betterAuth({
    database: prismaAdapter(prisma, {
        provider: "postgresql", 
    }),
    emailAndPassword: {
        enabled: true,
        autoSignIn: true,
    },
});
Was this page helpful?