Opened 2 hours ago

Last modified 73 minutes ago

#35802 new Bug

ERR_TOO_MANY_REDIRECTS while using LoginRequiredMiddleware

Reported by: Jehad Alrehaili Owned by:
Component: contrib.auth Version: 5.1
Severity: Normal Keywords: LoginRequiredMiddleware
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Using LoginRequiredMiddleware while using Allauth will cause too many redirects on unauthenticated user when trying to access login_url.

urlpatterns = [
    ...
    path("accounts/", include("allauth.urls")),
]

Based on documentation

Redirects all unauthenticated requests to a login page, except for views excluded with login_not_required().

which login_not_required() couldn't be passed to Allauth login view.

Change History (1)

comment:1 by Hisham Mahmood, 73 minutes ago

What version of django-allauth are you using? AFAIK LoginRequiredMiddleware is supported on version 65.0.0 and higher.

Note: See TracTickets for help on using tickets.
Back to Top