簡體   English   中英

IdentityServer4 - Angular 如何將默認登錄頁面更改為 Angular 組件

[英]IdentityServer4 - Angular how to change the default Login page to Angular component

如何將 Login.cs.html 頁面從 IdentityServer4 更改為 Angular 組件?

我該怎么做?

謝謝

您可以通過UserInteraction 設置設置登錄頁面的路徑。 在此處閱讀有關 IDS4 登錄流程的更多信息。

例如,如果您在http://localhost:3000上托管了 angular 應用程序,則設置如下所示:

services.AddIdentityServer(
    options =>
    {
        options.UserInteraction.LoginUrl = "http://localhost:3000/login";
        options.UserInteraction.ErrorUrl = "http://localhost:3000/error";
        options.UserInteraction.LogoutUrl = "http://localhost:3000/logout";
    })
    .AddInMemoryIdentityResources(Config.GetIdentityResources())
    .AddInMemoryApiResources(Config.GetApis())
    .AddInMemoryClients(Config.GetClients())
    .AddTestUsers(Config.GetTestUsers());

是一個包含所有詳細信息的帖子。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM