Opened 14 months ago
Closed 14 months 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 , 14 months ago
comment:2 by , 14 months ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
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.
What version of
django-allauthare you using? AFAIKLoginRequiredMiddlewareis supported on version 65.0.0 and higher.