docs: fix broken link

This commit is contained in:
Bereket Engida
2024-09-28 02:45:47 +03:00
parent 1ff5f3d06f
commit 3b9f7a52f5
2 changed files with 12 additions and 16 deletions

View File

@@ -15,20 +15,14 @@ export const auth = betterAuth({
}),
emailAndPassword: {
enabled: true,
async sendResetPassword(token, user) {
async sendResetPassword(url, user) {
const res = await resend.emails.send({
from,
to: user.email,
subject: "Reset your password",
react: reactResetPasswordEmail({
username: user.email,
resetLink: `${
process.env.NODE_ENV === "development"
? "http://localhost:3000"
: process.env.NEXT_PUBLIC_APP_URL ||
process.env.VERCEL_URL ||
process.env.BETTER_AUTH_URL
}/reset-password/${token}`,
resetLink: url,
}),
});
},