Hey guys,

I'm having a tough time finding any real documentation on the bridge between Magento and Drupal. As far as I know, there is no real way to fully implement a persistent login between the two platforms to date? Or is there a way and I haven't found it yet.

If there is no way to do this, can somebody maybe describe what the roadblocks are and whether or not this WILL be feasible in the future?

Please help!

Comments

Maxime Topolov’s picture

Hi generalto :)

In fact there is normally no need for an SSO between two platforms. In fact all actions are made in Drupal and communication between magento and Drupal is done on API server-to-server level.

SSO would look like :

I create a session on Drupal, then if I go on front-end of Magento i'm already authenticated.

How it works now :

I create a session in Drupal, and all actions i perform (checkout, payement, adding products to carts) are done in DRUPAL and when needed requests are sent trough XML-RPC API from Drupal server to Magento (which may be even NOT visible for normal users, on a private network).

Any questions ?

Sincerely, maxime

Maxime Topolov’s picture

Status: Active » Fixed
generaltao’s picture

Hi Maxime,

Thanks for getting back to me so quickly on this.

I would like some clarification on your response if that's alright. Basically how we were hoping to set up the site would be to have lots of brochure-style content pages in drupal. Also, we would keep our layout somewhat consistent on both platforms to make for a seemless experience. Once the user clicks a main category or some other link, they are brought over to Magento to shop and check out.

The problem is that in this way we would need to have that first SSO scenario you outlined. Create a session in EITHER Drupal or Magento and be able to bounce around and have a seemless experience throughout.

Is this just not doable?

Maxime Topolov’s picture

Well yes it IS but not with our module directly. You'll need to extend Magento to hack down authentication.

How it should work for me :

On magento when you check if you're logged or not, you do a request to load a cookie, you provide saved value to Drupal trough XML-RPC.
On Drupal side you write a simple module, probably based on Services, that catchs provided sessionID and checks internally if there is an open session for that ID, if so, returns to Magento all valuable data about the user (userID, userLogin & so on...).

Based on info got from Drupal, magento checks the userLogin or userEmail against user table and forces sessions creation for that user.

This is theory... now you need to code that :)

And also to make a Magento 2 Drupal user sync, you may pickup Drupal 2 Magento user sync from our code.

But this way remains problematic, since you'll still have two ways for a user to update his profile (magento / drupal) and also passwords.... that's not cool and finally you'll need to do exactly the same shit in other side. Means, if user arrives from Magento into Drupal, he ALSO must be logged in.

So all this were some reasons why we started a total integration between Magento & Drupal.

Maxim

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.