From 7e4910115b5cf141ca2b94e31be35dd02071449d Mon Sep 17 00:00:00 2001 From: Arsen Turchanikov Date: Mon, 17 Feb 2020 12:35:15 +0200 Subject: [PATCH] Add redirect to the portal page, update version --- edx_oauth_client/middleware.py | 4 ++++ setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/edx_oauth_client/middleware.py b/edx_oauth_client/middleware.py index 4b633c0..fe572fa 100644 --- a/edx_oauth_client/middleware.py +++ b/edx_oauth_client/middleware.py @@ -134,3 +134,7 @@ def process_request(self, request): return redirect(urljoin(provider_url, user_account_url_path)) elif start_url_path not in (API_URLS + OAUTH_PROCESS_URLS): request.session["force_auth"] = True + + # Custom redirect from edX index page to the portal index page + if request.path == "/": + return redirect(provider_url) diff --git a/setup.py b/setup.py index a333b53..3c8b012 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='edx-oauth-client', - version='ucdc-v.0.1.0', + version='ucdc-v.0.1.2', description='Client OAuth2 from edX installations', author='edX', url='https://github.com/raccoongang/edx_oauth_client',