fix: update logic for removing token from limiter

This commit is contained in:
Joe Previte 2021-04-19 11:12:43 -07:00
parent 958f01262b
commit 7a5042176e
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24

View File

@ -88,9 +88,7 @@ router.post("/", async (req, res) => {
// Note: successful logins should not count against the RateLimiter // Note: successful logins should not count against the RateLimiter
// which is why this logic must come after the successful login logic // which is why this logic must come after the successful login logic
if (!limiter.removeToken()) { limiter.removeToken()
throw new Error("Login rate limited!")
}
console.error( console.error(
"Failed login attempt", "Failed login attempt",