0

example : project name : 1. CarMaintenanceProject. 2. BikeMaintenanceProject. 3. MotorcycleMaintenanceProject.

i want 1 login for every project, but can access multiple project without more login, example i successfully login in BikeMaintenanceProject and then i will acces MotorcycleMaintenanceProject without login.

  • If I get your question right, I would probably just put those 3 projects together using namespacing for everything else but user management. – Marc-Antoine Parent Feb 13 '17 at 02:52
  • sorry sir, but im going to put the role on each project, not in global project. i want to use 1 login for multiple project. just using 1 user table for login on multiple project. – moch alfarisyi Feb 13 '17 at 03:19

1 Answers1

1

Then you need to create 4 projects.

1 project for the login/Single Sign On (SSO). This project will hold your users table and an API for authentication (JWT/Passport/etc.).

Then from any project, when user submits users details, you send them to the SSO project via API and gets a response if the login was successful. The SSO should return a token to the project from which the user is logging in.

You can learn more about Laravel Passport and token grants here: https://laravel.com/docs/5.4/passport

You mentioned using JWT, here are some resources to get you started: https://dzone.com/articles/from-json-web-token-to-single-sign-on-part-1-creat-1

Single sign-on flow using JWT for cross domain authentication

Good luck mate!

Community
  • 1
  • 1
EddyTheDove
  • 12,979
  • 2
  • 37
  • 45