This commit is contained in:
asadiqbal
2017-11-14 16:09:24 +05:00
parent ded3422790
commit e5c55a8945
4 changed files with 47 additions and 1 deletions

View File

@@ -10,6 +10,8 @@ If true, it:
b) calls apply_settings(), passing in the Django settings
"""
from openedx.features.enterprise_support.api import insert_enterprise_pipeline_elements
_FIELDS_STORED_IN_SESSION = ['auth_entry', 'next']
_MIDDLEWARE_CLASSES = ['third_party_auth.middleware.ExceptionMiddleware']
_SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/dashboard'
@@ -59,6 +61,9 @@ def apply_settings(django_settings):
'third_party_auth.pipeline.login_analytics',
]
# Add enterprise pipeline elements if the enterprise app is installed
insert_enterprise_pipeline_elements(django_settings.SOCIAL_AUTH_PIPELINE)
# Required so that we can use unmodified PSA OAuth2 backends:
django_settings.SOCIAL_AUTH_STRATEGY = 'third_party_auth.strategy.ConfigurationModelStrategy'