Open Closed

Implementation of 2FA using MVC #788


User avatar
0
ChetanKumbhar created

I have created one demo application to implement 2 factor authentication using mvc. I done all the configuration for one user, email verified, two factor authentication enabled. when i enter user name & password it thows mi an exception NotImplementedException: The method or operation is not implemented. Volo.Abp.Account.Web.Pages.Account.LoginModel.TwoFactorLoginResultAsync()

I gone through all the document, i could not get sample source code to implement TwoFactorLoginResultAsync(), or any other solution which will resolve my issue. I also not found 1. /Account/SendSecurityCode 2. /Account/VerifySecurityCode

Kindly provide me sample source code to implement 2 factor authentication in MVC.

Than

  • ABP Framework version: v4.0.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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

    hi

    I have created one demo application to implement 2 factor authentication using mvc. I done all the configuration for one user, email verified, two factor authentication enabled. when i enter user name & password it thows mi an exception

    Can you share your steps in detail?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ChetanKumbhar created
    1. created application with UI MVC(Tired),
    2. seeds data
    3. created one user,
    4. update user email verified & two factor enabled.
    5. Then, tried to log in, I enter user name & password clicked on log in.
    6. I got that exception.

    Let me know what i am missing.

    Kindly provide me sample source code to implement 2 factor authentication in MVC.

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

    Hi,

    any update on this ? can we have online session, because this thing is on priority?

    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 ChetanKumbhar

    I will check it asap.

    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

    I can't reproduce your problem, can you share your problem project to me? 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
    ChetanKumbhar created

    Hi,

    I have shared link with you.

    Thanks & regards

    Chetan Kumbhar.

    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 @ChetanKumbhar

    You are using the free abp startup template project. It does not implement too many features, you can use the commercial startup template project.

    https://docs.abp.io/en/commercial/latest/getting-started-create-solution https://docs.abp.io/en/commercial/latest/abp-framework-vs-abp-commercial

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

    Hi,

    I have created one demo commercial application, in email verification when i click verify, it shows me email send successfully but i didn't received mail. Can you tell me what configuration i need to do?

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

    Can we have online session? Can we connect quickly on call?

    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 have created one demo commercial application, in email verification when i click verify, it shows me email send successfully but i didn't received mail.

    You can check the content of the email in the logs. You can remove such code in the XXX_DomainModule.

    #if DEBUG
                context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
    #endif
    
    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 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.