#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.