Open Closed

The management of login processes in the microservices architecture #5498


User avatar
0
ilhan.ordukaya created

The exact solution to your question may have been answered before, and please use the search on the homepage.

If you're creating a bug/problem report, please include the followings:

  • ABP Framework version: v7.0.2
  • UI type: Angular / MVC
  • DB provider: EF Core
  • Tiered (MVC) or Auth Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

"We have an architecture similar to the one shown in the image, where the login processes take place in the authserver project. We have developed some code to override or create custom login processes in the authentication server. However, we couldn't find a designated place in the MVC project where we can change the login process. We are wondering if ABP handles this through an automated module. Can you assist us with this scenario?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

24 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The oauth2 handle by OpenIddict:

    https://github.com/abpframework/abp/tree/dev/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    The oauth2 handle by OpenIddict:

    https://github.com/abpframework/abp/tree/dev/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers

    hi maliming

    I tried to implement such a custom login, but I don't know how to link it to the login Razor Page you mentioned in the first image? how can I do that?

    I couldn't breakpoint when I logged in

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We use page to handle the login request instead of controller.

    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml.cs

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    We use page to handle the login request instead of controller.

    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml.cs

    I actually use the classes you mentioned, but I still can't debug myaccountcontroller.cs that it produces while logging in.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The application will not call the myaccountcontroller during login.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    The application will not call the myaccountcontroller during login.

    why?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Because the LoginModel handles the login request.

    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml
    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml.cs
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    Because the LoginModel handles the login request.

    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml 
    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml.cs 
    

    well I will never use myaccountcontroller then when logging in.So when will my login method be used or can I use my own login method while logging in?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You have to override the code from Volo.Abp.Account.Public.Web.Pages.Account.LoginModel

    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml 
    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml.cs 
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    You have to override the code from Volo.Abp.Account.Public.Web.Pages.Account.LoginModel

    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml  
    Volo.Abp.Account.Pro.Public.Web/Pages/Account/Login.cshtml.cs  
    

    Is there a sample project or a document related to this topic?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project

    https://community.abp.io/posts/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd https://gist.github.com/ebicoglu/ce0f0425bab806d0ee1a87d0073af96b

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project

    https://community.abp.io/posts/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd https://gist.github.com/ebicoglu/ce0f0425bab806d0ee1a87d0073af96b

    I'm doing such a development, I'm getting an error in references, what do you think?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can download this project to test.

    https://github.com/abpframework/abp-samples/tree/master/Authentication-Customization https://github.com/abpframework/abp-samples/tree/master/Authentication-Customization/src/Acme.BookStore.Web/Pages/Account

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    You can download this project to test.

    https://github.com/abpframework/abp-samples/tree/master/Authentication-Customization https://github.com/abpframework/abp-samples/tree/master/Authentication-Customization/src/Acme.BookStore.Web/Pages/Account

    I looked at the sample project, it looks exactly the same, but I still get this error

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok. Can you share your project?

    liming.ma@volosoft.com

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    ok. Can you share your project?

    liming.ma@volosoft.com

    hi maliming

    reference problem solved but

    I want to use my own override login method to login, as far as I understand, I can't use it or how can I use it?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The AccountController will not call during the login process.

    You have to add your custom code to YourLoginModel

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    The AccountController will not call during the login process.

    You have to add your custom code to YourLoginModel

    How can I define here?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can override the base methods to add your custom code.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    You can override the base methods to add your custom code.

    Isn't what you're saying here actually being done?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I said:you can override the base methods to add your custom code in CustomLoginModel

    Login has nothing to do with AccountController

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    I said:you can override the base methods to add your custom code in CustomLoginModel

    Login has nothing to do with AccountController

    I understand

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ilhan.ordukaya created

    hi

    I said:you can override the base methods to add your custom code in CustomLoginModel

    Login has nothing to do with AccountController

    I want to develop a login with 2FA (Two-Factor Authentication) feature using ABP Community. How can I achieve this using ABP

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can download the Account.Pro module to check the code. we have implemented the 2FA login on the commercial side.

    https://docs.abp.io/en/commercial/latest/modules/account#two-factor-authentication https://support.abp.io/QA/Questions/632/How-can-I-download-the-source-code-of-the-framework-Angular-packages-theme-and-pro-modules

     abp get-source Volo.Account.Pro
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.