Creating a custom Oauth plugin based on an existing Open edX plugin

Hi there !

I once tried to install the latest Open edX version (from source) on a blank server. (FAILED)

Then - as Lawrence McDaniel recommended - i downgraded the version of Open edX (Ironwood) and somehow managed to install a neeeearly working instance of Open edX ! (thanks to Bitnami)

What’s a working instance as for me ?

Well, i need my users to be able to log in through their (already created on an other app) accounts, via Oauth 2

So i installed the edx-oauth-client on my Bitnami instance and, although it was clearly lacking clear instructions as of cutomizing options… that was it !
But the Bitnami container was a bit difficult to maintain on our infrastructure, so we’ve choosen to end this solution…

Now that we’re happy with Tutor (yay :smiling_face_with_three_hearts:), i am facing a new issue :

  1. First of all, trust me (or not) : i’m reading the docs every day i try to solve my issue :wink:

  2. Then,[with the plugin examples in the docs, i found, i’m not able to see whether it’s possible or not to include my former plugin to the tutor codebase.

  3. In the plugin API doc, i can’t figure it out if it is complete or if there is just a few use cases

If someone with a similar experience or a successful experience of Oauth integration could help me out, i would probably make sure to share it on a public repo (on GitHub) in order to let people know.

I’m sure Tutor users would appreciate this thread !

With my best regards and the best of luck in these times,

1 Like

Hi @t-leclercq! Do you mean that you don’t understand how to create a plugin? Or do you need an extra entrypoint to the plugin system?

The plugin system allows us to add complex systems on top of Open edX, such as the discovery service. The core of the plugin system are actually the patches: They allow you to add arbitrary content to pretty much all Tutor templates.

The goal of the Tutor plugin system is to allow you to customize the platform exactly to fit your needs. If you need an additional entry point (an extra {{ patch ...}} statement for instance) then we can almost certainly create it.

Hi @regis !

Thank you for your quick reply !

Basically, i understood the basics of the docs’ examples but i haven’t figured out how to use patches in order to add a custom backend to the Oauth Providers.

Based on these instructions, i manged to add a provider as i was more confident with the codebase.

Right now, i would like to know if i’m right if i tend to think that config (and not patches) are the right way to use existant parameters in Open edX. My goal is to implement this

Am i on the right way ? (or does it look like i make a moutain out of a molehill ? :sweat_smile:)

Thanks again ! :smiley:

Whenever you read that you need to modify a certain file (lms.env.json, *.py settings, etc.) then you need to add a patch to your plugin. If you need to specify some values that will change from one user or environment to another, then you need to add an entry to the config object. I strongly encourage you to take a look and experiment with the existing tutor-discovery plugin, as well as the plugin cookiecutter.

1 Like

I see, i will experiment my addition tonight and i will get back to you to share my results !
Thank you for your time, it is clearer now and i’ll definitely take a look at cookiecutter !

See you !

1 Like

Hi @regis,

I’m working on my plugin and i successfully added it.
It is old, so i need to do a few adjustments, i will forward you some patches creation requests if needed…

BUT : do you know if someone, somewhere, successfully added a Oauth2 backend to open edX (tutor, more precisely) ? (because that’s actually my goal…)

I have no idea. If someone has, I’d love to know.

hi @t-leclercq im trying to develop the same plugin that u are talking about in this post, did u manage to successfully implemented ?, i been looking for some kind of direction in the forum without getting anywhere

1 Like

Hi, someone has gotten it? :>

Yup, actually i’ve managed to do it. I’ve spent a long time working with erroneous informations about our identity provider.
I’ll remind myself to share my work, i’ve completely forgotten to share my findings.
Hang on @IosifSc i will take time to write about what i did.
Could you share what you’re trying to achieve in the meantime ?