新文章 网摘 文章 随笔 日记

添加IdentityServer4的登录UI

https://github.com/IdentityServer/IdentityServer4.Quickstart.UI/tree/master

下载zip包,把Quickstart、Views、wwwroot三个文件夹复制到你的IdentityServer4项目根目录下,如果使用.netcore 3.0以上,在StartUp.cs中:

public void ConfigureServices(IServiceCollection services)
{
    services.AddControllersWithViews().AddRazorRuntimeCompilation();
    //……

app.UseEndpoints(endpoints =>
{
    endpoints.MapControllers();
});

改为:

app.UseEndpoints(endpoints =>
{
    endpoints.MapDefaultControllerRoute();
});

https://identityserver4.readthedocs.io/en/latest/quickstarts/2_interactive_aspnetcore.html

https://github.com/IdentityServer/IdentityServer4.Quickstart.UI/tree/master

posted @ 2020-03-27 14:59  岭南春  阅读(194)  评论(0)    收藏  举报