I have to create way to use the same users to connect to multiple application, and i am thinking about how to do it and how to share the data between the applications.
Each application will have an REST API and an Angular Frontend.
For now i thought about doing a application that will handle the connexion and the common data of the user (name, email...). This application would create a jwt token.
On every other application i would have a table with only the id of the user and application related data.
Theses application api would do rest api call on the auth api to verify the token,and to get the data.
If the user want to update his data the call would be directly to the auth api.
With that logic i can think about some problems that i don't have any answer right now.
First, when i want to get the data of one user i don't see any problems, but if i want more users i'm not sure thats a good idea.
For example if i want to get the list of the users in a csv file + some data linked in the current application. I could do a api call for each user but that could be a lot of call. Or one call with a parameters with the list of ids, but i think it would be mess to relink the data to my list.
To do the api calls i found a package: doctrine-rest-driver but it was last updated in 2019
Do you think my approach is the good one ? Is there an other way to share the data between the applications ?
Or is there a way to create something like a view inside the application database, but from another server and with the structure updated ?