We have an IdentityServer4 project, A web Api project (.net core 5) and an SPA front project (Vue.js).
User creation will be done when SPA send a register request to IS4 project local endpoint.
Then we have a createCompany endpoint which need to create a a company in webApi project and update CompanyId in IdentityServer4 project.
The question is how it is better to be implemented ?
Should webApi directly call IdentityServer4 endpoint to update companyId or front end should send seperate request to IS4 for update companyId ?
What is the best way to access UserManager from webApi ? for example get the list of users with specific CompanyId ? Or specific EmailAddress ? Should I create a separate local endpoint for each one of them in IS4 ? Is there any way to fully manage users from webapi directly without creating many endpoints for user management in Identityserver4 ?