This commit is contained in:
2025-12-07 22:45:02 +01:00
parent af5f9567f1
commit e92eccc7d3
2 changed files with 4 additions and 0 deletions

View File

@@ -198,10 +198,12 @@ export default async function authRoutes(server: FastifyInstance) {
const plainPassword = generateRandomPassword();
const passwordHash = await hashPassword(plainPassword);
await server.db
.update(authUsers)
.set({
passwordHash,
// @ts-ignore
mustChangePassword: true,
})
.where(eq(authUsers.id, user.id));