Better-auth not adding user info to the user table in React
I'm creating a test app to work on authentication and authorization with a database using Better-Auth. I have never used Better Auth before and I'm having some issues with it. I have added the schema to the Postgres database to make the table, and whenever i create a new account, it will add a new instance to the account table, but not the user table.
const data = await auth.api.signUpEmail({
body: {
email: req.body.email,
name: req.body.name,
password: hashedPass,
},
});
This is the code i have in my server.js to add the info. The info comes from a form on the front end. It super basic right now since I'm just learning how to use it. The docs for better-auth say these are the only required fields to be able to submit into the database. I receive no errors when sending the data to my database, it just simply isnt adding anything to the user table. I'll be happy to provide any other necessary code or info. Im using React by the way.
export const auth = betterAuth({
database: new Pool({
user: 'postgres',
host: 'localhost',
database: 'test',
password: process.env.DB_PASS,
port: 5432,
max: 10
}),
emailAndPassword: {
enabled: true
}
});
The code above is the auth.ts configuration as i have it right now. i'm sure im missing something, but i havent found out what yet. Does anyone have any idea why the info isnt being added to the user table in Postgres?