I need to integrate a third party application with Magento, so that

  • people can login into the third party app with their Magento 2 Credentials
  • and stay logged into the Magento frontend when they land on the e-commerce from the third party app.

In other words I need to implement some kind of SSO with Magento as an identity provider.

The full use case would be something like this:

  1. The user lands on the third party app;
  2. User logs in using the application login form;
  3. The user is authenticated against Magento 2 REST API;
  4. At some moment, user clicks on a link that redirects him to the Magento2 frontend;
  5. The user lands on the Magento 2 frontend and Magento recognizes him as the previously authenticated user.

The first solution that came to my mind was to use JWT in step 4, to transfer the authentication information from the application to the Magento frontend, but I can't find a plugin that supports this.

  • If a full custom solution is needed, where should I look first (obserer, plugin, ...other)?
  • Are there other solutions to achieve this?

Other limitations and preferences:

  • We can't use OAuth or SAML or other protocols since they need the user to be redirected for the login. The login must be done in the third party application and recognized on both applications.
  • A plugin solution for Magento would be best, instead of developing a full custom solution.

This question is also be related, the only difference is that I don't need the token to be the exact REST API token.

This question looks related also, but I really can't get the answer there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.