How to integrate with existing php site that handles authentication?

I’m looking to migrate (over time) a Drupal 7 (php) site to a Parse / JS based site. I had started by adding the php-sdk, however the Drupal 7 site already handles sessions, so when using the php-sdk to create users in Parse, it overwrites the session causing the user to get logged out.

Is there a way to create and sign-in users in parse based on their Drupal user account? What approaches should I be looking at?

There is no kind of feature specific for Drupal integration. What do you mean by “overwrite the session”? Can you share some code that you are using to integrate Drupal and Parse so we can better advise?


The situation is that I have an existing Drupal 7 site with several thousand accounts. The plan is to slowly migrate off of Drupal to a parse-backed implementation with a JS front-end. My thought was to create accounts on Parse for each account on Drupal and start moving different types of content over to Parse and then interacting with it there instead of Drupal.

I included the SDK in a custom Drupal module and started to create Parse accounts (if needed) when users logged in to the Drupal site. I was following the example in the signUp method to create the new Parse user, add a few pieces of data, and then call signUp().

However, once the signUp() method is called, it then calls handleSaveResult() with $makeCurrent = TRUE. Since there is already a session_id() from Drupal, the handleSaveResult() calls session_regenerate_id().

When that happens the user is logged out of Drupal because of the session regeneration.

So I’m looking for advice / recommendations on ways to create / log-in a Parse user without impacting the Drupal user / session.

@caschbre sorry for the delay. Could you please share the code that you are using to create the parse server accounts?