title: Rails: is it possible to share session between two apps with two different databases?
body: <p>I have Rails <em>app 1</em>, I want <em>rails app 2</em> to authenticate through <em>Rails app 1</em>, I wonder if that is possible ?</p>
  
  <p>I'm using devise on both:</p>
  
  <p>The reason behind this is that I have the main network app, which is app 1, and then the nodes of the network which are the other apps, I want all the nodes to be able to authenticate through the main app.</p>
  
  <p>I'm already establishing authentication on each app using 1 main User-table from the main app, but now I just need to figure out how to share the session.</p>
  
  <hr>
  
  <p>I have looked at the following questions, but they are doing it inside the same database, not across apps:</p>
  
  <p><a href="https://stackoverflow.com/questions/2588241/rails-sessions-current-practices">Rails sessions current practices</a></p>
  
  <p><a href="https://stackoverflow.com/questions/16314155/sharing-session-across-rails-apps-on-different-subdomains">Sharing session across rails apps on different subdomains</a></p>
  
  <p>I want to do exactly what this fellow exactly wants to do:</p>
  
  <hr>
  
  <p><a href="https://stackoverflow.com/questions/14387577/rails-authentication-strategy-for-noob">Rails authentication strategy for noob</a></p>
  
  <hr>
  
  <pre><code>Navigate to rails app --&gt;
  redirect unauthenticated users to SSO server --&gt;
  login and authenticate via remote SSO server --&gt;
  callback/redirect to rails app --&gt;
  capture user info passed back from SSO server and load protected resources in rails app
  </code></pre>
  
  <hr>
  
  <p><strong>UPDATE:</strong>
  I think I can use this <a href="https://github.com/rest-client/rest-client" rel="nofollow noreferrer">Rest-Client</a> to authenticate through rails app 1 on rails app 2. No ? Yea ?</p>