emailOTP({
overrideDefaultEmailVerification: true,
sendVerificationOnSignUp: true,
otpLength: 6,
expiresIn: 300,
sendVerificationOTP: async ({ email, otp, type }) => {
if (type === "email-verification") {
resend.emails.send({
from: `${Bun.env.EMAIL_SENDER_NAME} <${Bun.env.EMAIL_SENDER_ADDRESS}>`,
to: email,
subject: "Verify your email address",
react: OTPEmail({ otp }),
});
}
},
changeEmail: {
enabled: true,
}
})
emailOTP({
overrideDefaultEmailVerification: true,
sendVerificationOnSignUp: true,
otpLength: 6,
expiresIn: 300,
sendVerificationOTP: async ({ email, otp, type }) => {
if (type === "email-verification") {
resend.emails.send({
from: `${Bun.env.EMAIL_SENDER_NAME} <${Bun.env.EMAIL_SENDER_ADDRESS}>`,
to: email,
subject: "Verify your email address",
react: OTPEmail({ otp }),
});
}
},
changeEmail: {
enabled: true,
}
})