Sharing authentication between php and python in the same domain

I am in the early stages of planning a new project / site. Two thirties applications are already written in php / laravel. The new bit will be written in python, most likely using Flask or Cherrypy (I need Nosql access, so Django is missing).

The Laravel application is the main site and manages user registration, authentication, activity flows and notifications, as well as general REST Api. This part of the site is already under development, so switching to python is not an option.

Both sections will need to be fully integrated with the end user. Design and themes would be identical. Even the URLs did not display any difference:

site.com - laravel

site.com/forums - laravel

site.com/login,logout,signup - laravel

site.com/- laravel

site.com/maker - python / flask

I think I figured out how to serve both from a single server, and how can I share logins? The user should be able to log in using laravel and go to / maker and still log in.

Keep in mind:

  • the manufacturer will not register the user, just make sure that they are logged in. If not, go to the laravel login page.
  • In addition, both have access to the same database.

What are my options here?

+4
source share

All Articles