overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

Bug: Required MFE-Auth variables are not defined which breaks the UI #139

Closed misilot closed 1 year ago

misilot commented 1 year ago

Both INFO_EMAIL and PASSWORD_RESET_SUPPORT_LINK are missing, and possible others from the https://github.com/openedx/frontend-app-authn documentation.

Missing INFO_EMAIL

Steps to reproduce missing INFO_EMAIL

  1. Go to https://apps.demo.openedx.overhang.io/authn/reset?next=%2F
  2. See sentence that doesn't complete, "support at" image

If MFE_CONFIG["INFO_EMAIL"] = "{{ CONTACT_EMAIL }}" set via a plugin you get the following

image

Missing PASSWORD_RESET_SUPPORT_LINK

Without PASSWORD_RESET_SUPPORT_LINK the href is not generated correctly.

image

When MFE_CONFIG["PASSWORD_RESET_SUPPORT_LINK"] = "mailto:{{ CONTACT_EMAIL }}" set via a plugin you get the following:

image

Proposed Solution

Add the following to https://github.com/overhangio/tutor-mfe/blob/8522ab6adf149d27e6aeaed567795857af1c0647/tutormfe/patches/openedx-lms-production-settings#L3C1-L3C11

INFO_EMAIL = "{{ CONTACT_EMAIL }}
PASSWORD_RESET_SUPPORT_LINK = "mailto:{{ CONTACT_EMAIL }}"

@regisb if this makes sense, I can create a PR for it.

regisb commented 1 year ago

Yes, it does make sense, please open a PR! And please also make sure that your fix works in tutor dev.

misilot commented 1 year ago

I don't have any system to setup to use tutor dev unfortunately. If that will be an issue, I can attempt to get that working somewhere in the next couple of weeks