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: { emailAndPassword: {
enabled: true, enabled: true,
async sendResetPassword(token, user) { async sendResetPassword(url, user) {
const res = await resend.emails.send({ const res = await resend.emails.send({
from, from,
to: user.email, to: user.email,
subject: "Reset your password", subject: "Reset your password",
react: reactResetPasswordEmail({ react: reactResetPasswordEmail({
username: user.email, username: user.email,
resetLink: `${ resetLink: url,
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}`,
}), }),
}); });
}, },

View File

@@ -121,14 +121,16 @@ export default function Hero() {
Get Started Get Started
</Link> </Link>
<Button <Link href="https://github.com/better-auth/better-auth">
variant="outline" <Button
size="lg" variant="outline"
className="flex rounded-none items-center gap-2" size="lg"
> className="flex rounded-none items-center gap-2"
<Github size={16} /> >
View on GitHub <Github size={16} />
</Button> View on GitHub
</Button>
</Link>
</div> </div>
</> </>
} }