Вопрос

I'm using django-axes to limit login attempts to the admin backend. However, for my frontend client login via django-allauth I can't find any mechanism to detect and prevent failed logins.

What would be the best way to prevent multiple failed login attempts with allauth? Is there a recommended solution? I'm not too keen on blocking attempts from a particular IP, but it would be good to prevent multiple attempts at a single username ie 'admin'.

Thanks in advance,

Это было полезно?

Решение

I'm not sure if this is the best way to go about this, but I used axes to watch allauth login like so:

from axes.decorators import watch_login
from allauth.account.views import login 

url(r'^accounts/login/$', watch_login(login)),
url(r'^accounts/', include('allauth.urls')),
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top