2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

add headless

This commit is contained in:
Matthias Mair
2024-06-25 20:07:46 +02:00
parent 8378600947
commit 580057b763
2 changed files with 8 additions and 0 deletions

View File

@ -230,6 +230,7 @@ INSTALLED_APPS = [
'flags', # Flagging - django-flags 'flags', # Flagging - django-flags
'allauth', # Base app for SSO 'allauth', # Base app for SSO
'allauth.account', # Extend user with accounts 'allauth.account', # Extend user with accounts
'allauth.headless', # APIs for auth
'allauth.socialaccount', # Use 'social' providers 'allauth.socialaccount', # Use 'social' providers
'allauth.mfa', # MFA for for allauth 'allauth.mfa', # MFA for for allauth
'allauth.usersessions', # DB sessions 'allauth.usersessions', # DB sessions
@ -1182,6 +1183,12 @@ ACCOUNT_FORMS = {
SOCIALACCOUNT_ADAPTER = 'InvenTree.forms.CustomSocialAccountAdapter' SOCIALACCOUNT_ADAPTER = 'InvenTree.forms.CustomSocialAccountAdapter'
ACCOUNT_ADAPTER = 'InvenTree.forms.CustomAccountAdapter' 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 # Markdownify configuration
# Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html # Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html

View File

@ -124,6 +124,7 @@ apipatterns = [
), ),
]), ]),
), ),
path('_allauth/', include('allauth.headless.urls')),
# Magic login URLs # Magic login URLs
path( path(
'email/generate/', 'email/generate/',