mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-08 12:27:44 +00:00
18 lines
360 B
TypeScript
18 lines
360 B
TypeScript
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()],
|
|
});
|