You could setup database sessions and setup a connection to that specific database in all your apps.
http://laravel.com/docs/5.0/session
You could also go all-in and look into OAuth 2.0
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a lot of different applications, and a lot of users. If a user has a role in an application, he will get access to that app, with those roles(it can have more than 1). Else, he will not. When a user will login in any app, he is logged in in the system, and he can access any of its other apps with its credentials. When he logs out of one app, he is out from all the places at once. Same when he is not active for a specific amount of time. Each app is constructed in its own way. With or without a framework. This may not be that relevant, tho.
How can I keep the session synchronized between all those applications?
I was thinking to create a system with web services, and each access of a route, will also call the SSO app and update its status, and the SSO app would call all open applications of that user and update the session status in each app. However, I have the feeling it may not be the smartest and safest way. What is your opinion about such a problem? Another way would be to use a shared database with sessions... But that would make each app aware of one extra database.... Is this safer?
Please or to participate in this conversation.