title: 1 customer login for 2 web applications with individual login authentication and databases, possibly more
body: <p>How to make 2 separate back end apps served as one site, each handling different requests, ideally 1 embedded into the other, sharing a session once user is logged in?</p>
  
  <p>Currently there is one bespoke website/CMS application (app 1) not unlike a blog with a login form and signup. It uses oauth internally to connect to an API for the database on a seperate app. Blog posts are public on the website, customers login to the main site and can upload posts and see their editorial progress, receive feedback and more before the post can be made live, and Admin use a CMS to access what is submitted by customers and manage the posts including proxying in to users as needed to make changes.</p>
  
  <p>I now have another web application (app 2) to replace some of the functionality in the original CMS. It has its own CMS and frontend, login, and users stored in its database. </p>
  
  <p>I need a way to integrate the two of them so that customers login to app 1 and when they navigate to their post creating/editing they are seamlessly using app 2, no additional login, all using the original apps user auth. Admin can visit both apps CMS, ideally also with a single login.</p>
  
  <p>My first thought was I need another app/service to manage authentication and act as a gateway to the other apps serving pages?</p>
  
  <p>I see a lot about Single Sign On but it seems to relate more to using an external account to access my site "login with Facebook".</p>
  
  <p>What pattern for the infrastructure and code would be applicable in this instance? All apps are built on PHP, hosted on Linux.</p>