diff --git a/openedx/core/djangoapps/user_authn/cookies.py b/openedx/core/djangoapps/user_authn/cookies.py index 4dc66c209025..0f043ea41f3f 100644 --- a/openedx/core/djangoapps/user_authn/cookies.py +++ b/openedx/core/djangoapps/user_authn/cookies.py @@ -22,7 +22,7 @@ from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_from_token from openedx.core.djangoapps.user_api.accounts.utils import retrieve_last_sitewide_block_completed from openedx.core.djangoapps.user_authn.exceptions import AuthFailedError -from openedx.features.edly.cookies import set_logged_in_edly_cookies +from openedx.features.edly.cookies import delete_logged_in_edly_cookies, set_logged_in_edly_cookies from student.models import CourseEnrollment @@ -84,6 +84,8 @@ def delete_logged_in_cookies(response): domain=settings.SESSION_COOKIE_DOMAIN ) + delete_logged_in_edly_cookies(response) + return response diff --git a/openedx/core/djangoapps/user_authn/views/logout.py b/openedx/core/djangoapps/user_authn/views/logout.py index fae5f0400359..e040770b5337 100644 --- a/openedx/core/djangoapps/user_authn/views/logout.py +++ b/openedx/core/djangoapps/user_authn/views/logout.py @@ -11,7 +11,6 @@ from provider.oauth2.models import Client from openedx.core.djangoapps.user_authn.cookies import delete_logged_in_cookies from openedx.core.djangoapps.user_authn.utils import is_safe_login_or_logout_redirect -from openedx.features.edly.cookies import delete_logged_in_edly_cookies class LogoutView(TemplateView): @@ -66,7 +65,6 @@ def dispatch(self, request, *args, **kwargs): # Clear the cookie used by the edx.org marketing site delete_logged_in_cookies(response) - delete_logged_in_edly_cookies(response) return response