问题
I am using IdentityServer4 to secure my API and also to authenticate users, the client is the main ASP.NET Core MVC App, I just want the login interface and UI to be at the MVC App and the login implementation at the IdentityServer, so the IdentityServer must have an API to just receive username and password from the MVC app login page return the token which will be used in cookies
回答1:
It is a bad idea to move your views for several reasons. Some of them:
If you move the views to your MVC client you will have to create those views in all your clients.
OAuth2 / OpenId Connect should delegate authorization / authentication to your Idp to avoid credentials sharing. Instead of that, you are forced to use Resource Owner Password Credentials which implies that we cannot use the user's consent pages from the Idp.
You won't have Autentication Cookie from your Idp for Single Sign On.
来源:https://stackoverflow.com/questions/59560046/identityserver4-login-api