chore: fix examples

This commit is contained in:
Bereket Engida
2024-11-13 20:02:56 +03:00
parent 74f08b7d26
commit f65522487e
2 changed files with 5 additions and 9 deletions

View File

@@ -22,12 +22,6 @@ const libsql = new LibsqlDialect({
authToken: process.env.TURSO_AUTH_TOKEN || "",
});
const s = {
extra: {
type: "string",
},
} as const;
export const auth = betterAuth({
appName: "Better Auth Demo",
database: {
@@ -35,7 +29,7 @@ export const auth = betterAuth({
type: "sqlite",
},
emailVerification: {
async sendVerificationEmail(user, url) {
async sendVerificationEmail({ user, url }) {
console.log("Sending verification email to", user.email);
const res = await resend.emails.send({
from,
@@ -54,7 +48,7 @@ export const auth = betterAuth({
},
emailAndPassword: {
enabled: true,
async sendResetPassword(user, url) {
async sendResetPassword({ user, url }) {
await resend.emails.send({
from,
to: user.email,
@@ -119,7 +113,7 @@ export const auth = betterAuth({
}),
twoFactor({
otpOptions: {
async sendOTP(user, otp) {
async sendOTP({ user, otp }) {
await resend.emails.send({
from,
to: user.email,