[Django] #35802: ERR_TOO_MANY_REDIRECTS while using LoginRequiredMiddleware

10 views
Skip to first unread message

Django

unread,
Sep 28, 2024, 10:52:13 AM9/28/24
to django-...@googlegroups.com
#35802: ERR_TOO_MANY_REDIRECTS while using LoginRequiredMiddleware
-------------------------------------+-------------------------------------
Reporter: Jehad Alrehaili | Type: Bug
Status: new | Component:
| contrib.auth
Version: 5.1 | Severity: Normal
Keywords: | Triage Stage:
LoginRequiredMiddleware | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Using
[https://docs.djangoproject.com/en/5.1/ref/middleware/#django.contrib.auth.middleware.LoginRequiredMiddleware
LoginRequiredMiddleware] while using [https://allauth.org/ 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/35802>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 28, 2024, 12:05:12 PM9/28/24
to django-...@googlegroups.com
#35802: ERR_TOO_MANY_REDIRECTS while using LoginRequiredMiddleware
-------------------------------------+-------------------------------------
Reporter: Jehad Alrehaili | Owner: (none)
Type: Bug | Status: new
Component: contrib.auth | Version: 5.1
Severity: Normal | Resolution:
Keywords: | Triage Stage:
LoginRequiredMiddleware | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Hisham Mahmood):

What version of `django-allauth` are you using? AFAIK
`LoginRequiredMiddleware` is supported on version 65.0.0 and higher.
--
Ticket URL: <https://code.djangoproject.com/ticket/35802#comment:1>

Django

unread,
Sep 29, 2024, 5:36:23 AM9/29/24
to django-...@googlegroups.com
#35802: ERR_TOO_MANY_REDIRECTS while using LoginRequiredMiddleware
-------------------------------------+-------------------------------------
Reporter: Jehad Alrehaili | Owner: (none)
Type: Bug | Status: closed
Component: contrib.auth | Version: 5.1
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
LoginRequiredMiddleware | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* resolution: => invalid
* status: new => closed

Comment:

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.
--
Ticket URL: <https://code.djangoproject.com/ticket/35802#comment:2>
Reply all
Reply to author
Forward
0 new messages