use config.yaml for SSO providers

This commit is contained in:
Matthias 2021-08-24 19:35:41 +02:00
parent 1311558cac
commit d569d70f5b
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 9 additions and 0 deletions

View File

@ -286,6 +286,11 @@ INSTALLED_APPS = [
'allauth.socialaccount', # Use 'social' providers
]
# Load the allauth social backends
SOCIAL_BACKENDS = CONFIG.get('social_backends', [])
for app in SOCIAL_BACKENDS:
INSTALLED_APPS.append(app)
MIDDLEWARE = CONFIG.get('middleware', [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',

View File

@ -157,3 +157,7 @@ static_root: '/home/inventree/data/static'
# - 'django.contrib.messages.middleware.MessageMiddleware'
# - 'django.middleware.clickjacking.XFrameOptionsMiddleware'
# - 'InvenTree.middleware.AuthRequiredMiddleware'
# Add SSO login-backends
# social_backends:
# - 'allauth.socialaccount.providers.github'