export const auth = betterAuth({
appName: "DEMOCRAFT",
emailAndPassword: {
enabled: true,
},
database: prismaAdapter(prisma, {
provider: 'postgresql',
}),
disabledPaths: [
"/token",
],
plugins: [
jwt(),
twoFactor(),
oauthProvider({
loginPage: "/auth/login",
consentPage: "/auth/consent",
scopes: ["openid", "profile", "email", "offline_access", "stats"],
}),
stripe({
stripeClient,
stripeWebhookSecret: secretWebhook,
createCustomerOnSignUp: true,
})
]
});
export const auth = betterAuth({
appName: "DEMOCRAFT",
emailAndPassword: {
enabled: true,
},
database: prismaAdapter(prisma, {
provider: 'postgresql',
}),
disabledPaths: [
"/token",
],
plugins: [
jwt(),
twoFactor(),
oauthProvider({
loginPage: "/auth/login",
consentPage: "/auth/consent",
scopes: ["openid", "profile", "email", "offline_access", "stats"],
}),
stripe({
stripeClient,
stripeWebhookSecret: secretWebhook,
createCustomerOnSignUp: true,
})
]
});