IdentityServer4 login api

本秂侑毒 提交于 2020-01-16 08:43:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!