diff --git a/server/api/api/auth/reset/index.ts b/server/api/api/auth/reset/index.ts index e9f5e7ad..b1221f46 100644 --- a/server/api/api/auth/reset/index.ts +++ b/server/api/api/auth/reset/index.ts @@ -24,7 +24,6 @@ export const schemas = { form: z.object({ token: z.string().min(1), password: z.string().min(3).max(100), - password2: z.string().min(3).max(100), }), }; @@ -51,7 +50,7 @@ export default (app: Hono) => meta.route, zValidator("form", schemas.form, handleZodError), async (context) => { - const { token, password, password2 } = context.req.valid("form"); + const { token, password } = context.req.valid("form"); const user = await User.fromSql( eq(Users.passwordResetToken, token), @@ -61,14 +60,6 @@ export default (app: Hono) => return returnError(token, "invalid_token", "Invalid token"); } - if (password !== password2) { - return returnError( - token, - "password_mismatch", - "Passwords do not match", - ); - } - await user.update({ password: await Bun.password.hash(password), passwordResetToken: null,