twofa schema is missing
SERVER_ERROR: [Error [BetterAuthError]: [# Drizzle Adapter]: The model "twoFactor" was not found in the schema object. Please pass the schema directly to the adapter options.] {
cause: undefined
}
POST /api/auth/two-factor/enable 500 in 987ms
7 Replies
i did
npx drizzle-kit push
Solution
had to export it
nvm
I see you have export on the schema. where did you export it to?
in the db/schema.ts file
Once the schema is exported (like the code example above ^) you then pass that to the drizzle adapter options in the auth config
I was able to fix it. Thanks