mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 12:27:44 +00:00
chore: fix examples
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user