Skip to content

Commit 7a50421

Browse files
committed
fix: update logic for removing token from limiter
1 parent 958f012 commit 7a50421

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/node/routes/login.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ router.post("/", async (req, res) => {
8888

8989
// Note: successful logins should not count against the RateLimiter
9090
// which is why this logic must come after the successful login logic
91-
if (!limiter.removeToken()) {
92-
throw new Error("Login rate limited!")
93-
}
91+
limiter.removeToken()
9492

9593
console.error(
9694
"Failed login attempt",

0 commit comments

Comments
 (0)