diff --git a/src/backend/InvenTree/InvenTree/settings.py b/src/backend/InvenTree/InvenTree/settings.py index 09afa6f0a6..743d4b8961 100644 --- a/src/backend/InvenTree/InvenTree/settings.py +++ b/src/backend/InvenTree/InvenTree/settings.py @@ -230,6 +230,7 @@ INSTALLED_APPS = [ 'flags', # Flagging - django-flags 'allauth', # Base app for SSO 'allauth.account', # Extend user with accounts + 'allauth.headless', # APIs for auth 'allauth.socialaccount', # Use 'social' providers 'allauth.mfa', # MFA for for allauth 'allauth.usersessions', # DB sessions @@ -1182,6 +1183,12 @@ ACCOUNT_FORMS = { SOCIALACCOUNT_ADAPTER = 'InvenTree.forms.CustomSocialAccountAdapter' ACCOUNT_ADAPTER = 'InvenTree.forms.CustomAccountAdapter' +HEADLESS_FRONTEND_URLS = { + 'account_confirm_email': 'https://app.project.org/account/verify-email/{key}', + 'account_reset_password_from_key': 'https://app.org/account/password/reset/key/{key}', + 'account_signup': 'https://app.org/account/signup', +} + # 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 dde72230d2..10c0790178 100644 --- a/src/backend/InvenTree/InvenTree/urls.py +++ b/src/backend/InvenTree/InvenTree/urls.py @@ -124,6 +124,7 @@ apipatterns = [ ), ]), ), + path('_allauth/', include('allauth.headless.urls')), # Magic login URLs path( 'email/generate/',