How to use openedx's backend and integrate it into my existing express based web app

Hi All,

We have an express based app, in which we are trying to add lms module and to achieve that, we are planning to use Openedx instance running on AWS as lms backend!!!
To explain more, I’ll have my own lms frontend(ReactJs) and would be fetching lms data from OpenedX via our express backend!!!

So the question is, can we do this?
If yes, how do I propagate user sessions of my express app to Openedx? and what are the configurations required at openedx side???
Specifically, I want to transfer the JWT received at the nodejs backend from Reactjs frontend obtained via AWS cognito!!!
How do I let Openedx know, how to handle this JWT and grant us the corresponding privileges!!! I mean what are the configs required in lms.env.json to enable jwt auth?

Any help would be highly appreciated, thanks!!!

Hi Shubham,

Welcome to the community! I’m not sure I can answer all your questions but here are few things related to what you’re asking that I know about.

Auth:
If you’re using a 3rd party to authenticate and you want the platform to respect that, you probably want to be looking at these docs. They’re a little old but should help you orient to what the platform can do here.

Using a different Front End:
This might be pretty complicated, we currently have react base micro-frontends(MFEs) that hook into the backend via various APIs. You can probably use those APIs as well. If you’ve got an LMS up, you can go to the /api-docs path on it to see what APIs you have access to.

Of the MFEs the most relevant one for you is probably frontend-app-learning which is how we render course content right now.

I hope that helps! Good luck!

Hello, I am also working on a react native app to interact with tutor as a backend, I am able to make requests to the apis on postman. How ever in my react-native app it gives an unclear error that I believe is a CORs error, is there any developer documentation available for avoiding this?

I have also tried adding CORS_ORIGIN_ALLOW_ALL: true to my “$(tutor config printroot)/config.yml” and then running tutor dev start, It doesnt seem to change anything, not sure if this should go somewhere else