Social account not auto link

hi all,

I’m integrating Keycloak with Openedx,

After successfully login from Keycloak, when it redirects to openedx, it’s saying:

You have successfully signed into Keycloak, but your Keycloak account does not have a linked Openedx account. To link your accounts, sign in now using your Openedx password

I checked, and it’s because I manually click Unlink Keyloak account from my Openedx > Account

But then, when I test with fresh new deployment of Lilac (with Tutor), the linking is auto, even if after manually Unlink account


The pipeline of steps that runs the whole third party authentication system is very flexible and there are many ways of configuring it.
If you have not changed the default settings, then the TPA pipeline should be governed by:

You could look into the following steps to see if your user does not meet the requirements for any of them.


The last one you can find it in: social-core/ at master · python-social-auth/social-core · GitHub

1 Like

@Felipe , How would I create a plugin to change the pipeline?
I wanted to make some edits in 'common.djangoapps.third_party_auth.pipeline.associate_by_email_if_oauth'.

I realized that it’s because of I keep both normal login and oauth login.

After setting ENABLE_REQUIRE_THIRD_PARTY_AUTH=true it works fine

You can see an example here:

You would create a new step in your plugin and then alter the settings so that you replace the step 'common.djangoapps.third_party_auth.pipeline.associate_by_email_if_oauth' with your own.