Opened 7 weeks ago

Closed 7 weeks ago

#35802 closed Bug (invalid)

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 (2)

comment:1 by Hisham Mahmood, 7 weeks ago

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

comment:2 by Claude Paroz, 7 weeks ago

Resolution: invalid
Status: newclosed

This looks like a usage issue, see https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels

Re-open if you can show that Django is at fault.

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