| 1 |
Rate Limits |
| 2 |
=========== |
| 3 |
|
| 4 |
In this section the ratelimits related to the ``allauth.account`` app are |
| 5 |
documented. Refer to the :doc:`overall rate limit documentation <../common/rate_limits>` |
| 6 |
for more background information on the mechanism itself. |
| 7 |
|
| 8 |
The rate limits are configured through the ``ACCOUNT_RATE_LIMITS`` setting: |
| 9 |
|
| 10 |
- Set it to ``False`` to disable all rate limits. |
| 11 |
|
| 12 |
- Set it to a dictionary, e.g. ``{"action": "your-rate-limit", ...}`` to use the |
| 13 |
default configuration but with your specific actions overriden. |
| 14 |
|
| 15 |
|
| 16 |
The following actions are available for configuration: |
| 17 |
|
| 18 |
``"change_password"`` (default: ``"5/m/user"``) |
| 19 |
Changing the password (for already authenticated users). |
| 20 |
|
| 21 |
``"change_phone"`` (default: ``"1/m/user"``) |
| 22 |
Changing the phone number. |
| 23 |
|
| 24 |
``"manage_email"`` (default: ``"10/m/user"``) |
| 25 |
Email management related actions, such as add, remove, change primary. |
| 26 |
|
| 27 |
``"reset_password"`` (default: ``"20/m/ip,5/m/key"``) |
| 28 |
Requesting a password reset. The email for which the password is to be reset is |
| 29 |
passed as the key. |
| 30 |
|
| 31 |
``"reauthenticate"`` (default: ``"10/m/user"``) |
| 32 |
Reauthentication (for users already logged in). |
| 33 |
|
| 34 |
``"reset_password_from_key"`` (default: ``"20/m/ip"``) |
| 35 |
Password reset (the view the password reset email links to). |
| 36 |
|
| 37 |
``"signup"`` (default: ``"20/m/ip"``) |
| 38 |
Signups. |
| 39 |
|
| 40 |
``"login"`` (default: ``"30/m/ip"``) |
| 41 |
Logins. |
| 42 |
|
| 43 |
``"login_failed"`` (default: ``"10/m/ip,5/5m/key"``) |
| 44 |
Restricts the allowed number of failed login attempts. When exceeded, the user |
| 45 |
is prohibited from logging in for the remainder of the rate limit. Important: |
| 46 |
while this protects the allauth login view, it does not |
| 47 |
:doc:`protect Django's admin login from being brute forced <../common/admin>`. |
| 48 |
|
| 49 |
``"confirm_email"`` (default: ``"1/3m/key"`` (link) or ``"1/10s/key"`` (code)) |
| 50 |
Users can request email confirmation mails via the email management view, and, |
| 51 |
implicitly, when logging in with an unverified account. This rate limit |
| 52 |
prevents users from sending too many of these mails. |