fix: map custom Prisma model names to Better Auth schema
This commit is contained in:
parent
17ef200f6a
commit
17f6188132
1 changed files with 7 additions and 0 deletions
|
|
@ -5,6 +5,13 @@ import { db } from './db';
|
||||||
export const auth = betterAuth({
|
export const auth = betterAuth({
|
||||||
database: prismaAdapter(db, {
|
database: prismaAdapter(db, {
|
||||||
provider: 'postgresql',
|
provider: 'postgresql',
|
||||||
|
// Map our custom table names to Better Auth models
|
||||||
|
schema: {
|
||||||
|
user: 'auth_user',
|
||||||
|
session: 'auth_session',
|
||||||
|
account: 'auth_account',
|
||||||
|
verification: 'auth_verification',
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
emailAndPassword: {
|
emailAndPassword: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue