UmbracoTwoFactorAuthentication 1.0.0

dotnet add package UmbracoTwoFactorAuthentication --version 1.0.0
NuGet\Install-Package UmbracoTwoFactorAuthentication -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UmbracoTwoFactorAuthentication" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UmbracoTwoFactorAuthentication --version 1.0.0
#r "nuget: UmbracoTwoFactorAuthentication, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install UmbracoTwoFactorAuthentication as a Cake Addin
#addin nuget:?package=UmbracoTwoFactorAuthentication&version=1.0.0

// Install UmbracoTwoFactorAuthentication as a Cake Tool
#tool nuget:?package=UmbracoTwoFactorAuthentication&version=1.0.0

Plugin based on Twillio sms provide

After package installed you need to connfigure your web.config Twilio.AccountSID, Twilio.AuthToken, Twilio.ServiceSid and key to connect to Twilio services.

<add key="Twilio.AccountSID" value="Value" /> <add key="Twilio.AuthToken" value="Value" /> <add key="Twilio.ServiceSid" value="Value" />

You need to change owin:appStartup to TwoFactorBackOfficeOwinStartup <add key="owin:appStartup" value="TwoFactorBackOfficeOwinStartup" />

If you use custom owin:appStartup you just need to change UmbracoBackOfficeUserManager on override ConfigureUmbracoAuthentication method Example:

protected override void ConfigureUmbracoAuthentication(IAppBuilder app) { base.ConfigureUmbracoAuthentication(app);

app.SetUmbracoLoggerFactory();

var applicationContext = Services;
// There are several overloads of this method that allow you to customize the BackOfficeUserManager or even custom BackOfficeUserStore.
app.ConfigureUserManagerForUmbracoBackOffice<TwoFactorBackOfficeUserManager, BackOfficeIdentityUser>(
        Umbraco.Web.Composing.Current.RuntimeState,
        GlobalSettings,
        (options, context) =>
        {
            var membershipProvider = MembershipProviderExtensions
            .GetUsersMembershipProvider()
            .AsUmbracoMembershipProvider();

            var userManager = TwoFactorBackOfficeUserManager.Create(
                options,
                applicationContext.UserService,
                applicationContext.MemberTypeService,
                applicationContext.EntityService,
                applicationContext.ExternalLoginService,
                membershipProvider,
                GlobalSettings,
                Mapper);

            return userManager;
        });

app
    .UseUmbracoBackOfficeCookieAuthentication(UmbracoContextAccessor, RuntimeState, Services.UserService, GlobalSettings, UmbracoSettings.Security, PipelineStage.Authenticate)
    .UseUmbracoBackOfficeExternalCookieAuthentication(UmbracoContextAccessor, RuntimeState, GlobalSettings, PipelineStage.Authenticate)
    .UseUmbracoPreviewAuthentication(UmbracoContextAccessor, RuntimeState, GlobalSettings, UmbracoSettings.Security, PipelineStage.Authorize)
    // For 2 fa auth
    .UseTwoFactorSignInCookie(global::Umbraco.Core.Constants.Security.BackOfficeTwoFactorAuthenticationType, TimeSpan.FromMinutes(5));

}

Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 405 9/2/2021

1.0.0 Initial release