Enabling devstack redirect to MFEs from LMS logistration

As discussed at the 7/30 FedX meeting, a solution has been developed to enable the redirect to MFEs from LMS logistration - a behavior that previously was only enabled in our stage and production environments.

Here are the steps to enable MFE logistration redirects in devstack:

In edx-platform/lms/envs/devstack.py separate the netloc (Django’s terminology for host name) for your MFE and the scheme (in the case of devstack: http://) into two variables. E.g.:

The {MFE_NAME}_NETLOC variable then needs to be added to the LOGIN_REDIRECT_WHITELIST within the same devstack.py settings file. E.g.:

Relevant code found here: https://github.com/edx/edx-platform/blob/master/lms/envs/devstack.py

Now that the LMS is configured to allow safe redirects to your MFE, you need to ensure that the next query param (which indicates the URL to redirect to from LMS logistration) is using a full URL. This must include both the scheme and netloc (as is assigned to the ENTERPRISE_LEARNER_PORTAL_BASE_URL above), plus (optionally) any trailing URL path and query parameters.

In the case of the Enterprise Admin Portal, the MFE’s BASE_URL is defined in frontend-app-admin-portal/config/webpack.dev.config.js .

Code found here: https://github.com/edx/frontend-app-admin-portal/blob/master/config/webpack.dev.config.js

Feel free to reach out to @Jeff Chaves (Deactivated) with any questions!