From 9103c1c0cfc001daed362f53833f8d85d264e278 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 25 Apr 2025 10:08:03 +0800 Subject: [PATCH] Update customization-user-interface.md --- .../ui/mvc-razor-pages/customization-user-interface.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en/framework/ui/mvc-razor-pages/customization-user-interface.md b/docs/en/framework/ui/mvc-razor-pages/customization-user-interface.md index bc3b7d8fc2..c279f685c0 100644 --- a/docs/en/framework/ui/mvc-razor-pages/customization-user-interface.md +++ b/docs/en/framework/ui/mvc-razor-pages/customization-user-interface.md @@ -89,7 +89,10 @@ This example overrides the **login page** defined by the [Account Module](../../ Create a page model class deriving from the ` LoginModel ` (defined in the ` Volo.Abp.Account.Web.Pages.Account ` namespace): +> If you are using the `AbpAccountWebOpenIddictModule` or `AbpAccountPublicWebOpenIddictModule`, the base class is `OpenIddictSupportedLoginModel` instead of `LoginModel`. And you should change the `ExposeServices` attribute to `[ExposeServices(typeof (MyLoginModel), typeof(OpenIddictSupportedLoginModel), typeof(LoginModel))]` + ````csharp +[ExposeServices(typeof (MyLoginModel), typeof(LoginModel))] public class MyLoginModel : LoginModel { public MyLoginModel( @@ -114,8 +117,6 @@ public class MyLoginModel : LoginModel You can override any method or add new properties/methods if needed. -> Notice that we didn't use `[Dependency(ReplaceServices = true)]` or `[ExposeServices(typeof(LoginModel))]` since we don't want to replace the existing class in the dependency injection, we define a new one. - Copy `Login.cshtml` file into your solution as just described above. Change the **@model** directive to point to the `MyLoginModel`: ````xml