feat: add onError and throw error options for APIError (#162)

This commit is contained in:
Bereket Engida
2024-10-13 21:34:09 +03:00
committed by GitHub
parent 8255a6ed5d
commit b145d78d6f
11 changed files with 103 additions and 46 deletions

View File

@@ -0,0 +1,17 @@
import { betterAuth } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import { twoFactor } from "better-auth/plugins";
export const auth = betterAuth({
baseURL: "http://localhost:4000",
database: prismaAdapter(
{},
{
provider: "sqlite",
},
),
emailAndPassword: {
enabled: true,
},
plugins: [twoFactor()],
});