Help with MFE Authn

Hi everyone !

I am using tutor version 17.0.5.

in my config.yml file, I put the following:

MFE_AUTHN_MFE_APP:
name: authn
port: 1999
repository: https://username:token@github.com/my_repository.git

I want to modify some parts of the MFE Auth (login), however, when I run the ‘tutor images build mfe’ command and after finishing and restarting the platform, my changes are not applied.

I guess my repository is not being consumed.

Does anyone know how I can consume my repository for the MFE Authn?

thanks in advance.

Hi! For development you need to mount your mfe app directory. In config.yml it is MOUNTS option (not necessary edit it directly). And for production I do the same but with tutor plugin. Command to add mount that replace frontend-app-authn looks like:

tutor mounts add <path to directory with your repo on host>/frontend-app-authn

And directory name must be exactly like mfe repo name your plan to overwrite.

In details: GitHub - 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.

That’s right, and I add that when you want to disassemble it, use the following:

tutor mounts remove <path to directory with your repo on host>/frontend-app-authn

Thank you very much for your answers.

So, the steps would be:

1- clone the repository on my host machine

2- then use this command ‘tutor mounts add /frontend-app-authn’ with the path of my cloned repository on my host machine

it’s right ?

Yes, you clone the official repo on your machine, look for the version you are using.

  • Then you do ‘npm install’ to install the node modules from the MFE folder.
  • Then you mount the MFE ‘tutor mounts add [local path]/frontend-app-auth’
  • Then ‘tutor config save’
  • And finally ‘tutor dev start -d’
    The changes you make are reflected in the browser, if any change is not taken you do a ‘tutor dev restart’ again and that’s it.
    Or ‘tutor dev stop’ and then again ‘tutor dev start -d’.
    Regards!!!

I understand

In the case of a platform in production, will it be the same steps but instead of using ‘dev tutor…’ I would use ‘local tutor…’?

or are different steps used?

Yes. But when you use tutor local launch, mounted app not updating in runtime. To apply changes in production don’t forget to run tutor images build mfe before tutor local launch.