def apply_settings(django_settings):
 django_settings.FIELDS_STORED_IN_SESSION = _FIELDS_STORED_IN_SESSION
 django_settings.MIDDLEWARE_CLASSES += _MIDDLEWARE_CLASSES
 django_settings.SOCIAL_AUTH_LOGIN_ERROR_URL = '/'
 django_settings.SOCIAL_AUTH_LOGIN_REDIRECT_URL = _SOCIAL_AUTH_LOGIN_REDIRECT_URL
 django_settings.SOCIAL_AUTH_PIPELINE = ['third_party_auth.pipeline.parse_query_params', 'social.pipeline.social_auth.social_details', 'social.pipeline.social_auth.social_uid', 'social.pipeline.social_auth.auth_allowed', 'social.pipeline.social_auth.social_user', 'third_party_auth.pipeline.associate_by_email_if_login_api', 'social.pipeline.user.get_username', 'third_party_auth.pipeline.set_pipeline_timeout', 'third_party_auth.pipeline.ensure_user_information', 'social.pipeline.user.create_user', 'social.pipeline.social_auth.associate_user', 'social.pipeline.social_auth.load_extra_data', 'social.pipeline.user.user_details', 'third_party_auth.pipeline.set_logged_in_cookies', 'third_party_auth.pipeline.login_analytics']
 insert_enterprise_pipeline_elements(django_settings.SOCIAL_AUTH_PIPELINE)
 django_settings.SOCIAL_AUTH_STRATEGY = 'third_party_auth.strategy.ConfigurationModelStrategy'
 django_settings.SOCIAL_AUTH_PROTECTED_USER_FIELDS = ['email']
 django_settings.SOCIAL_AUTH_RAISE_EXCEPTIONS = False
 django_settings.SOCIAL_AUTH_INACTIVE_USER_LOGIN = True
 django_settings.SOCIAL_AUTH_INACTIVE_USER_URL = '/auth/inactive'
 django_settings.SOCIAL_AUTH_UUID_LENGTH = 4
 django_settings.DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] += ('social.apps.django_app.context_processors.backends', 'social.apps.django_app.context_processors.login_redirect')

def apply_settings ( django_settings ) : django_settings . FIELDS_STORED_IN_SESSION = _FIELDS_STORED_IN_SESSION django_settings . MIDDLEWARE_CLASSES += _MIDDLEWARE_CLASSES django_settings . SOCIAL_AUTH_LOGIN_ERROR_URL = '/' django_settings . SOCIAL_AUTH_LOGIN_REDIRECT_URL = _SOCIAL_AUTH_LOGIN_REDIRECT_URL django_settings . SOCIAL_AUTH_PIPELINE = [ 'third_party_auth.pipeline.parse_query_params' , 'social.pipeline.social_auth.social_details' , 'social.pipeline.social_auth.social_uid' , 'social.pipeline.social_auth.auth_allowed' , 'social.pipeline.social_auth.social_user' , 'third_party_auth.pipeline.associate_by_email_if_login_api' , 'social.pipeline.user.get_username' , 'third_party_auth.pipeline.set_pipeline_timeout' , 'third_party_auth.pipeline.ensure_user_information' , 'social.pipeline.user.create_user' , 'social.pipeline.social_auth.associate_user' , 'social.pipeline.social_auth.load_extra_data' , 'social.pipeline.user.user_details' , 'third_party_auth.pipeline.set_logged_in_cookies' , 'third_party_auth.pipeline.login_analytics' ] insert_enterprise_pipeline_elements ( django_settings . SOCIAL_AUTH_PIPELINE ) django_settings . SOCIAL_AUTH_STRATEGY = 'third_party_auth.strategy.ConfigurationModelStrategy' django_settings . SOCIAL_AUTH_PROTECTED_USER_FIELDS = [ 'email' ] django_settings . SOCIAL_AUTH_RAISE_EXCEPTIONS = False django_settings . SOCIAL_AUTH_INACTIVE_USER_LOGIN = True django_settings . SOCIAL_AUTH_INACTIVE_USER_URL = '/auth/inactive' django_settings . SOCIAL_AUTH_UUID_LENGTH = 4 django_settings . DEFAULT_TEMPLATE_ENGINE [ 'OPTIONS' ] [ 'context_processors' ] += ( 'social.apps.django_app.context_processors.backends' , 'social.apps.django_app.context_processors.login_redirect' )
set provider-independent settings .