remove INVALID_PASSWORD error response. close #1090

This commit is contained in:
Madeline 2023-08-13 15:18:42 +10:00
parent fd829fc669
commit 2cf3833499
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
2 changed files with 12 additions and 5 deletions

View File

@ -1,7 +1,6 @@
{ {
"login": { "login": {
"INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_LOGIN": "Login or password is invalid.",
"INVALID_PASSWORD": "Invalid Password",
"ACCOUNT_DISABLED": "This account is disabled" "ACCOUNT_DISABLED": "This account is disabled"
}, },
"register": { "register": {
@ -13,4 +12,4 @@
"CONSENT_REQUIRED": "You must agree to the Terms of Service and Privacy Policy.", "CONSENT_REQUIRED": "You must agree to the Terms of Service and Privacy Policy.",
"USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another" "USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another"
} }
} }

View File

@ -93,6 +93,10 @@ router.post(
message: req.t("auth:login.INVALID_LOGIN"), message: req.t("auth:login.INVALID_LOGIN"),
code: "INVALID_LOGIN", code: "INVALID_LOGIN",
}, },
password: {
message: req.t("auth:login.INVALID_LOGIN"),
code: "INVALID_LOGIN",
},
}); });
}); });
@ -103,9 +107,13 @@ router.post(
); );
if (!same_password) { if (!same_password) {
throw FieldErrors({ throw FieldErrors({
login: {
message: req.t("auth:login.INVALID_LOGIN"),
code: "INVALID_LOGIN",
},
password: { password: {
message: req.t("auth:login.INVALID_PASSWORD"), message: req.t("auth:login.INVALID_LOGIN"),
code: "INVALID_PASSWORD", code: "INVALID_LOGIN",
}, },
}); });
} }