2016-08-24 42 views
0

對於我的.Net Core應用程序,我正在使用Identity Server 4作爲Token Service。我無法找到添加自定義user registration頁面的方法。我可以添加login,logout頁面,如下所示。在Identity Server 4中添加自定義用戶註冊頁面

services.AddIdentityServer(
       options => 
        { 
         options.UserInteractionOptions.LoginUrl = "/ui/login"; 
         options.UserInteractionOptions.LogoutUrl = "/ui/logout"; 
        }); 

我記得有一種方法可以在Identity Server 3添加自定義registerforgot password頁面,如下圖所示。

AuthenticationOptions = new AuthenticationOptions 
        { 
         IdentityProviders = ConfigureAdditionalIdentityProviders, 
         LoginPageLinks = new LoginPageLink[] { 
          new LoginPageLink{ 
           Text = "Register", 
           Href = "localregistration" 
          }, 
          new LoginPageLink{ 
           Text = "Forgot Password?", 
           Href = "~/forgotpassword", 
          } 
         } 
        } 

我在Identity Server 4找不到相似的功能。任何人都可以幫我解決這個問題。任何幫助,高度讚賞。

回答

0

用戶管理不是Identity Server 4的功能。你應該實現自己的用戶管理系統。或者使用aspnet標識來管理用戶,here是Identity Server4的aspnet標識示例。

+0

謝謝Adem,我已經爲用戶管理實施了Identity。但我希望該功能可以在用戶點擊註冊表時將用戶重定向到註冊表單。它在IdentityServer3中,但不在最新版本中。 – Venky

+0

您是否看到過這個示例https://github.com/IdentityServer/IdentityServer4.Samples/tree/dev/SpaWithAspId3AndIdSvr4? –

+0

是的,但這是更多的MVC處理。我需要能夠在「Identity Server 4」中配置視圖。他們給'登錄,註銷'定製,但不能註冊。我只是想知道有一個解決方法。 – Venky

相關問題