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?


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

  • 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

  • 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

  • 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.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The application will not call the myaccountcontroller during login.

  • User Avatar
    0
    ilhan.ordukaya created

    hi

    The application will not call the myaccountcontroller during login.

    why?

  • 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
    
  • 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?

  • 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 
    
  • 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?

  • 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

  • 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?

  • 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

  • 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

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok. Can you share your project?

    liming.ma@volosoft.com

  • 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?

  • 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

  • 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?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

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

  • 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?

  • 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

  • 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

  • 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

  • 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
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19