Add forgot-password and reset-password flow

Users can now request a password reset link via email. Better Auth
sendResetPassword callback sends a branded email via Resend. Login
page shows success notice after password is set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-07 11:04:06 +05:00
parent 93e74951a7
commit a5e7b20699
8 changed files with 280 additions and 4 deletions
+5 -3
View File
@@ -95,12 +95,14 @@ export function LoginForm() {
>
{loading ? "Вход..." : "Войти"}
</button>
<p className="text-center text-xs" style={{ color: "var(--muted-foreground)" }}>
Нет аккаунта?{" "}
<div className="flex items-center justify-between text-xs" style={{ color: "var(--muted-foreground)" }}>
<Link href="/forgot-password" className="underline" style={{ color: "var(--muted-foreground)" }}>
Забыли пароль?
</Link>
<Link href="/register" className="underline" style={{ color: "var(--foreground)" }}>
Зарегистрироваться
</Link>
</p>
</div>
</form>
);
}