From 7a5042176ef1fb1c13dbe94e05ee0ce21d2e127c Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 19 Apr 2021 11:12:43 -0700 Subject: [PATCH] fix: update logic for removing token from limiter --- src/node/routes/login.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/node/routes/login.ts b/src/node/routes/login.ts index f02c9c08..e0b5ddda 100644 --- a/src/node/routes/login.ts +++ b/src/node/routes/login.ts @@ -88,9 +88,7 @@ router.post("/", async (req, res) => { // Note: successful logins should not count against the RateLimiter // which is why this logic must come after the successful login logic - if (!limiter.removeToken()) { - throw new Error("Login rate limited!") - } + limiter.removeToken() console.error( "Failed login attempt",