chore: secure hooks and update dependencies #4 #9
Frontend security / security (push) Successful in 11s
Frontend verify / verify (push) Successful in 4m35s

This commit is contained in:
2026-09-13 19:36:15 +03:00
parent 7a89356f87
commit 3be6e61b8f
10 changed files with 899 additions and 841 deletions
+5 -5
View File
@@ -25,7 +25,7 @@ const email = z
value.split("@").length === 2 &&
value.split("@").every(Boolean) &&
!value.split("").some(isEmailCharacterInvalid),
validationMessage("auth.validation.invalidEmail"),
{ error: validationMessage("auth.validation.invalidEmail") },
);
const password = z
.string()
@@ -33,7 +33,7 @@ const password = z
(value) =>
new TextEncoder().encode(value).length >= MIN_PASSWORD_BYTES &&
new TextEncoder().encode(value).length <= MAX_PASSWORD_BYTES,
validationMessage("auth.validation.invalidPasswordLength"),
{ error: validationMessage("auth.validation.invalidPasswordLength") },
);
const loginSchema = z.object({
@@ -43,10 +43,10 @@ const loginSchema = z.object({
});
const registerSchema = loginSchema.refine(
(value) => value.password === value.passwordConfirmation,
(value) => ({
{
path: ["passwordConfirmation"],
...validationMessage("auth.validation.passwordsDoNotMatch")(value),
}),
error: validationMessage("auth.validation.passwordsDoNotMatch"),
},
);
type AuthFormValues = z.input<typeof loginSchema>;