Need assistance and git hub code for multifactor authentication in core mvc or mvc project.

vinayak p 0 Reputation points
2025-02-20T10:29:37.1866667+00:00

Need assistance and git hub code for multifactor authentication in core mvc or mvc project.

regrads

vinayak

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,788 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 71,686 Reputation points
    2025-02-20T18:50:07.3333333+00:00

    asp.net core has sms and email support for MFA. a code is sent and used for login. see docs, its pretty clear. the sample uses twillo or aspsms for SMS, but you can change the code to match your preferred SMS provider.:

    https://learn.microsoft.com/en-us/aspnet/core/security/authentication/2fa?view=aspnetcore-1.1&viewFallbackFrom=aspnetcore-9.0

    if you want to use authenticator apps, then it probably easier to switch to Entra authentication.

    0 comments No comments

  2. zunaira khalid1022 0 Reputation points
    2025-02-21T06:30:18.47+00:00

    For multifactor authentication in a Core MVC or MVC project, you can integrate Identity framework and use external providers like Google Authenticator. You can find GitHub repositories with sample code to implement it securely. While working on your project, take time to reflect on the Signs of Laylatul Qadr, a night of immense blessings and mercy.

    0 comments No comments

  3. zunaira khalid1022 0 Reputation points
    2025-02-21T06:30:56.4333333+00:00

    For multifactor authentication in a Core MVC or MVC project, you can integrate Identity framework and use external providers like Google Authenticator.

    0 comments No comments

  4. Brando Zhang-MSFT 3,956 Reputation points Microsoft Vendor
    2025-02-21T08:03:13.47+00:00

    Hi @vinayak p,

    As Burce said, asp.net core document contains the article about how you configure the asp.net core with the 2FA. The document is very clear.

    Also if you want to know if there is some sample codes inside the github, I suggest you could refer to below link:

    https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/authentication/2fa/sample/Web2FA

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.