phronesis / Auth0

This is an extension that adds the ability to log into your Magento application using Auth0
9 stars 6 forks source link

Magento Integration Issue #20

Open amierhaider1 opened 4 years ago

amierhaider1 commented 4 years ago

I am trying to do SSO with Magento using Auth0. However I am facing the issue that after login using Auth0, the protal remains on same login page for magento.

I have created a ticket with Auth0 and below is response from them:

An update on this situation; as I mentioned before based on the return of an authorization code to the client application the expectation would be that the application back-end would perform a call to /oauth/token in order to exchange that code, however, during the timeframe for the provided HAR I could not find any indication of such a call being attempted based on an analysis from our internal logs.

The quickly checked the plugin (https://github.com/phronesis/Auth0) source code to see if there was something that we missed, but there seems to be something wrong/incomplete with it. Usually these sort of plugins will define a well-known route that will be responsible for handling the received code.

However, for this plugin I could not find any documentation and from a look at the source code the only thing I could find is that the plugin defines a /sso route (https://github.com/phronesis/Auth0/blob/4c0d852cef8b5ce27fb377b5beef4a6b0486c9dd/etc/frontend/routes.xml#L5) due to the inclusion of a dependency to (https://github.com/gloopro/Gloo-SSO).

This could mean that the application should be configured to redirect to /sso with the code instead of the root path, however, I manually attempted to invoke https://magento2.crm-couch.com/sso?code=x and the response is just the Hello World string coming from (https://github.com/gloopro/Gloo-SSO/blob/master/Controller/Index/Index.php#L16) so this may suggest that the plugin is not really production ready.

Can you please fix the issue and update?

Thanks

phronesis commented 4 years ago

After you install the extension, you are required to configure it from within Magento Admin. That is where you input the return url. Kindly let me know if this helps, else we can walk through this together.