You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
## Change Log
2
2
3
+
#### 0.20.X: Brute force protection
4
+
5
+
##### 0.20.1
6
+
-:sparkles: if `security.passwordResetRateLimit` is set, password reset request are rate limited per username/email and the correct username/email must be included in the password reset requests
7
+
-:bug: sporadic session creation errors are fixed
8
+
9
+
##### 0.20.0
10
+
-:sparkles: if `security.loginRateLimit` is set, login requests are rate limited per username/email
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -376,7 +376,7 @@ It's easy to add custom fields to user documents. When added to a `profile` fiel
376
376
377
377
## Brute force protection
378
378
379
-
To enable brute force protection for the `/login` route you just need to add `loginRateLimit: {}` to `security` in your `config`. Adding just the empty object uses following defaults that can be overriden as needed:
379
+
To enable brute force protection for the `/login` route you just need to add `loginRateLimit: {}` to `security` in your `config`. The same goes for the `/password-reset` route, where you just need to add `passwordResetRateLimit: {}` accordingly. Adding just the empty object uses following defaults that can be overriden as needed:
- You won't be able to override the keyGenerator option, as we use usernameField from the config.
409
+
- When activating rate limiting for the `/password-reset` route, `username` field is required in the request body!
409
410
- If you want to use Redis Store instead of Memory Store you currently need to use [rate-limit-redis@2x](https://github.com/wyattjoh/rate-limit-redis/tree/v2.1.0) for now [due to known issues](https://github.com/express-rate-limit/express-slow-down/issues/40#issuecomment-1548011953) with newer versions of rate-limit-redis.
410
411
411
412
## Advanced Configuration
@@ -481,6 +482,8 @@ forgot-password `token` and new password
481
482
##### `POST /password-reset`
482
483
483
484
Resets the password. Required fields: `token`, `password`, and `confirmPassword`.
485
+
If `security.passwordResetRateLimit` is set, `username` (or your configured
0 commit comments