mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
use config.yaml for SSO providers
This commit is contained in:
parent
1311558cac
commit
d569d70f5b
@ -286,6 +286,11 @@ INSTALLED_APPS = [
|
|||||||
'allauth.socialaccount', # Use 'social' providers
|
'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', [
|
MIDDLEWARE = CONFIG.get('middleware', [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
@ -157,3 +157,7 @@ static_root: '/home/inventree/data/static'
|
|||||||
# - 'django.contrib.messages.middleware.MessageMiddleware'
|
# - 'django.contrib.messages.middleware.MessageMiddleware'
|
||||||
# - 'django.middleware.clickjacking.XFrameOptionsMiddleware'
|
# - 'django.middleware.clickjacking.XFrameOptionsMiddleware'
|
||||||
# - 'InvenTree.middleware.AuthRequiredMiddleware'
|
# - 'InvenTree.middleware.AuthRequiredMiddleware'
|
||||||
|
|
||||||
|
# Add SSO login-backends
|
||||||
|
# social_backends:
|
||||||
|
# - 'allauth.socialaccount.providers.github'
|
||||||
|
Loading…
Reference in New Issue
Block a user