From 831ee5f3cb7659852286ebc3e16e3ea0b809ea52 Mon Sep 17 00:00:00 2001 From: Hamza Munir Date: Wed, 19 Jul 2017 15:34:01 +0500 Subject: [PATCH] Passing the extra argument key value pair to the social auth url for microsoft. --- common/djangoapps/third_party_auth/settings.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/third_party_auth/settings.py b/common/djangoapps/third_party_auth/settings.py index c768332270..8e902da18d 100644 --- a/common/djangoapps/third_party_auth/settings.py +++ b/common/djangoapps/third_party_auth/settings.py @@ -18,7 +18,9 @@ _MIDDLEWARE_CLASSES = ( 'third_party_auth.middleware.PipelineQuarantineMiddleware', ) _SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/dashboard' - +_SOCIAL_AUTH_AZUREAD_OAUTH2_AUTH_EXTRA_ARGUMENTS = { + 'msafed': 0 +} def apply_settings(django_settings): """Set provider-independent settings.""" @@ -38,6 +40,9 @@ def apply_settings(django_settings): # Where to send the user once social authentication is successful. django_settings.SOCIAL_AUTH_LOGIN_REDIRECT_URL = _SOCIAL_AUTH_LOGIN_REDIRECT_URL + # Adding extra key value pair in the url query string for microsoft as per request + django_settings.SOCIAL_AUTH_AZUREAD_OAUTH2_AUTH_EXTRA_ARGUMENTS = _SOCIAL_AUTH_AZUREAD_OAUTH2_AUTH_EXTRA_ARGUMENTS + # Inject our customized auth pipeline. All auth backends must work with # this pipeline. django_settings.SOCIAL_AUTH_PIPELINE = [