feat: srp removal, requested changes

This commit is contained in:
Daniel Hougaard
2025-07-30 04:44:25 +04:00
parent d5dd2e8bfd
commit 2d3b1b18d2
9 changed files with 15 additions and 24 deletions
@@ -382,6 +382,15 @@ export const authLoginServiceFactory = ({
await verifyCaptcha(userEnc, captchaToken);
if (!(await crypto.hashing().compareHash(password, userEnc.hashedPassword))) {
await userDAL.update(
{ id: userEnc.userId },
{
$incr: {
consecutiveFailedPasswordAttempts: 1
}
}
);
throw new BadRequestError({ message: "Invalid username or email" });
}
@@ -397,7 +406,6 @@ export const authLoginServiceFactory = ({
});
return {
mfaEnabled: userEnc.isMfaEnabled,
tokens: {
accessToken: token.access,
refreshToken: token.refresh