chore: fix demo deps

This commit is contained in:
Bereket Engida
2024-10-17 23:06:46 +03:00
parent df5597c7d3
commit 285fbf71ff
2 changed files with 32 additions and 54 deletions

View File

@@ -24,9 +24,22 @@ export const auth = betterAuth({
dialect: libsql,
type: "sqlite",
},
emailVerification: {
async sendVerificationEmail(user, url) {
console.log("Sending verification email to", user.email);
const res = await resend.emails.send({
from,
to: to || user.email,
subject: "Verify your email address",
html: `<a href="${url}">Verify your email address</a>`,
});
console.log(res, user.email);
},
sendEmailVerificationOnSignUp: true,
},
emailAndPassword: {
enabled: true,
async sendResetPassword(url, user) {
async sendResetPassword(user, url) {
await resend.emails.send({
from,
to: user.email,
@@ -37,17 +50,6 @@ export const auth = betterAuth({
}),
});
},
sendEmailVerificationOnSignUp: true,
async sendVerificationEmail(email, url) {
console.log("Sending verification email to", email);
const res = await resend.emails.send({
from,
to: to || email,
subject: "Verify your email address",
html: `<a href="${url}">Verify your email address</a>`,
});
console.log(res, email);
},
},
plugins: [
organization({
@@ -107,5 +109,9 @@ export const auth = betterAuth({
clientId: process.env.MICROSOFT_CLIENT_ID || "",
clientSecret: process.env.MICROSOFT_CLIENT_SECRET || "",
},
twitch: {
clientId: process.env.TWITCH_CLIENT_ID || "",
clientSecret: process.env.TWITCH_CLIENT_SECRET || "",
},
},
});