MCPcopy Create free account
hub / github.com/better-auth/examples / sendOTP

Function sendOTP

astro-example/src/auth.ts:31–39  ·  view source on GitHub ↗
(user, otp)

Source from the content-addressed store, hash-verified

29 twoFactor({
30 otpOptions: {
31 async sendOTP(user, otp) {
32 console.log(`Sending OTP to ${user.email}: ${otp}`);
33 // await resend.emails.send({
34 // from: "Acme <no-reply@demo.better-auth.com>",
35 // to: user.email,
36 // subject: "Your OTP",
37 // html: `Your OTP is ${otp}`,
38 // });
39 },
40 },
41 }),
42 ],

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected