diff --git a/src/backend/InvenTree/InvenTree/settings.py b/src/backend/InvenTree/InvenTree/settings.py index 5e8909b8d9..13e4375279 100644 --- a/src/backend/InvenTree/InvenTree/settings.py +++ b/src/backend/InvenTree/InvenTree/settings.py @@ -1184,6 +1184,7 @@ HEADLESS_FRONTEND_URLS = { 'account_reset_password_from_key': 'https://app.org/account/password/reset/key/{key}', 'account_signup': 'https://app.org/account/signup', } +HEADLESS_ONLY = not ENABLE_CLASSIC_FRONTEND # Markdownify configuration # Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html diff --git a/src/backend/InvenTree/InvenTree/urls.py b/src/backend/InvenTree/InvenTree/urls.py index accca0a7e1..99b9814d99 100644 --- a/src/backend/InvenTree/InvenTree/urls.py +++ b/src/backend/InvenTree/InvenTree/urls.py @@ -370,7 +370,6 @@ classic_frontendpatterns = [ ), # Override login page path('accounts/login/', CustomLoginView.as_view(), name='account_login'), - path('accounts/', include('allauth.urls')), # included urlpatterns ] urlpatterns = [] @@ -392,6 +391,12 @@ frontendpatterns = [] if settings.ENABLE_CLASSIC_FRONTEND: frontendpatterns += classic_frontendpatterns + +# Add auth +frontendpatterns += [ + path('accounts/', include('allauth.urls')) # Always needed as we need providers +] + if settings.ENABLE_PLATFORM_FRONTEND: frontendpatterns += platform_urls if not settings.ENABLE_CLASSIC_FRONTEND: