diff --git a/composed_configuration/_allauth.py b/composed_configuration/_allauth.py index 0316bc6..0ae64e9 100644 --- a/composed_configuration/_allauth.py +++ b/composed_configuration/_allauth.py @@ -28,6 +28,10 @@ def mutate_configuration(configuration: Type[ComposedConfiguration]) -> None: # auth_style should come before others, to ensure its template overrides are found configuration.INSTALLED_APPS.insert(0, 'auth_style') + configuration.MIDDLEWARE += [ + 'allauth.account.middleware.AccountMiddleware', + ] + # The sites framework requires this to be set. # In the unlikely case where a database's pk sequence for the django_site table is not reset, # the default site object could have a different pk. Then this will need to be overridden diff --git a/setup.py b/setup.py index f49d228..f3c21c5 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,8 @@ _base_extras = [ 'django>=4', - 'django-allauth', + # Required for "allauth.account.middleware.AccountMiddleware" + 'django-allauth>=0.56.0', 'django-auth-style', 'django-cors-headers', 'django-extensions',