I have two applications on one server, both at different sites. I was wondering if anyone knew how I could login on one site and then be redirected to the other site and stay logged in?
I had a similar problem last year in the startup I worked last year. Our solution was to have the sessions stored using memcached served by a third server accessible by both of the app servers.
In our case we wanted to carry the user's session from a PHP webapp to a node.js submodule, but all the servers were in the same infrastructure.
It should work, but if one of your app servers is in a different infrastructure I imagine there could be a performance hit by using this strategy.
By site do you mean like different apps? I assumed different sites location like AWS New York or AWS São Paulo. Sorry :)
If they are all in the same server it should work if you use the same APP_KEY (look in your .env file) and the same cookie identifier (look in your config\session.php file for the cookie key) in both apps. Actually I tested locally and it worked.
But it does not seem to be a good idea from a security point of view.
@rodrigo.pedra Security was my main concern, so maybe I will just need to re-think how I'm doing things. Thank you for showing how it's possible though.