introduce strict rate limitso on auth router endpoints

This commit is contained in:
miloschwartz
2025-07-14 18:00:41 -07:00
parent d6fdb38c22
commit b7df0b122d
6 changed files with 236 additions and 99 deletions

View File

@@ -75,6 +75,14 @@ export async function verifyTotp(
)
);
user = res;
const validPassword = await verifyPassword(
password,
user.passwordHash!
);
if (!validPassword) {
return next(unauthorized());
}
}
if (!user) {
@@ -91,14 +99,6 @@ export async function verifyTotp(
);
}
const validPassword = await verifyPassword(
password,
user.passwordHash!
);
if (!validPassword) {
return next(unauthorized());
}
if (user.type !== UserType.Internal) {
return next(
createHttpError(