Open
Description
In the installation section of the documentation at the very end of the page, the following method is proposed to use the allauth authentication workflow (including two-factor authentication) for access the Django admin site:
admin.site.log = staff_member_required(admin.site.login, login_url = 'accounts/login')
admin.autodiscover()
However, if a registered user, who is not a staff member logs in, the result is an ERR_TOO_MANY_REDIRECTS
error. I tried to come up with a solution by looking at the staff_member_required decorator in the django documentation but was not successful. I know it is not a django-allauth-2fa specific question, but since the above code snippet is from the documentation, I thought I give it a try.