I have the following project structure:
- webapi (different domain)
- auth-server (different domain)
- angular-client (different domain)
Both the Web API and the authserver are on .NET Core 2.0 and I use IdentityServer4 for the generation of security tokens, which I achieve correctly. I am using a PostgreSQL DB to persist all the information of users, tokens, clients, etc.
My problem arises when I want to login with an angular client. I can not understand the way in which the service must be performed to achieve the login; I understand that it would be enough to send the auth-server the user, password and data of the angular client, so that it would return a token that would store it in the local storage and then use it for everything it wants inside the angular client, but I can not do it.
The IdentityServer documentation does not talk about how to do this kind of thing, and the truth is that I'm a bit frustrated.
Probe to make the path using the oidc-client library, but it seems that is not what I need since I do not know how to send the username and password to validate.
Please, could you recommend me what the correct workflow would be, or in any case how to request a token from the auth-server from Angular?
NORA: I do not add code, since it is a doubt of concept and not of code in reality.