Add password recovery page at /recover

This commit is contained in:
Bonna Moon
2026-06-29 16:44:42 -05:00
parent ddc0a60a0c
commit 8ec43f3561
5 changed files with 189 additions and 0 deletions

14
scripts/reset-password.ts Normal file
View File

@@ -0,0 +1,14 @@
import { PrismaClient } from "@prisma/client";
import { hashSync } from "bcryptjs";
const db = new PrismaClient();
async function main() {
const hash = hashSync("moonbase!", 10);
const result = await db.user.updateMany({
data: { passwordHash: hash, mustChangePassword: false },
});
console.log(`Reset password for ${result.count} user(s). Login with: moonbase!`);
}
main().catch(console.error).finally(() => db.$disconnect());