The 'right' way would depend on the use case. Specifically if they would use the same database. If you are working with the same data then go for a unified backend, otherwise it would be a package if it is just logic/resources shared and not the data.
No, the two products use different databases, but I can switch db based on domain. But I could get into a world of hurt security wise as a user needs to be able to login to both from one login, and session issues etc.
A multiple database architecture hurts when it comes to Laravel Validators , and some complex queries. Apart from that everything should work alright.
A better approach would be to separate the User management completely and tokenize the application to use validated users.
For an example a central User management system that gives access to multiple applications
etc ,
The authentication would be somewhat similar to a Social Login , you will login at a single location then use a token to access that application as that user.
gayanhewa said:
A multiple database architecture hurts when it comes to Laravel Validators , and some complex queries. Apart from that everything should work alright.
A better approach would be to separate the User management completely and tokenize the application to use validated users.
For an example a central User management system that gives access to multiple applications
- user 1 - app1, app2 , app3
- user 2 - app2
etc ,
The authentication would be somewhat similar to a Social Login , you will login at a single location then use a token to access that application as that user.
That is very interesting! May be a good way to go for all our apps and a way to internally navigate to the apps without re-login.
If SOA is the way to go, I need to assure scalability, and a seamless user experience.
Hi, I've forked a great OAuth 2.0 server that now runs on Laravel 5. You can check it out from the GitHub repo. Next you could use Socialite to easily (about 6 lines of well-formatted PHP) authenticate your two client websites with your own OAuth server that would hold the user credentials and accounts secured at a single location,
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community