I have 2 ASP .Net projects each with its own database:
- Identity App: acts as an authorization server with its own database that contains user info. Uses identity 4: Oauth 2.0 and OpenId (code flow)
- Resource App: Api that returns access to multiple resources. (database doesn't include anything about users)
Our front end communicates with the resource app mainly and uses the identity app for authorization. Now we are developing the functionality to add a user from the front end and to get all the users.
My questions:
- Should the frontend communicate directly with the Identity App to get the users?
- If not, how can I get the user info through the resource app?
I tried the following flow for adding a user but it didn't work:
- Frontend posts user to resource API (Note: the user is already authenticated using the authorization server)
- I use the authorization header in that request to build a rest sharp request to the authorization server
- The authorization server isn't recognizing the bearer token