Umbraco.Community.PunkTwoFactor 18.3.2.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package Umbraco.Community.PunkTwoFactor --version 18.3.2.7
                    
NuGet\Install-Package Umbraco.Community.PunkTwoFactor -Version 18.3.2.7
                    
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="Umbraco.Community.PunkTwoFactor" Version="18.3.2.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Umbraco.Community.PunkTwoFactor" Version="18.3.2.7" />
                    
Directory.Packages.props
<PackageReference Include="Umbraco.Community.PunkTwoFactor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Umbraco.Community.PunkTwoFactor --version 18.3.2.7
                    
#r "nuget: Umbraco.Community.PunkTwoFactor, 18.3.2.7"
                    
#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.
#:package Umbraco.Community.PunkTwoFactor@18.3.2.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Umbraco.Community.PunkTwoFactor&version=18.3.2.7
                    
Install as a Cake Addin
#tool nuget:?package=Umbraco.Community.PunkTwoFactor&version=18.3.2.7
                    
Install as a Cake Tool

Umbraco.Community.PunkTwoFactor

NuGet release NuGet downloads CI License: MIT

Two-Factor Authentication (2FA) for Umbraco backoffice users.

This package adds standard TOTP authenticator app support (Google Authenticator, Microsoft Authenticator, 1Password, etc.) to the Umbraco backoffice. It registers itself automatically on startup via an Umbraco IComposer, with no code changes required.


Getting Started

Install the package from NuGet:

dotnet add package Umbraco.Community.PunkTwoFactor

Once installed, users can enable 2FA from their profile in the Umbraco backoffice:

  1. Log in to the Umbraco backoffice.
  2. Click your user avatar in the top-right corner and select Configure Two-Factor.
  3. Click Enable on Two Factor Authentication.
  4. Scan the QR code with your authenticator app and enter the 6-digit verification code.

Configuration

You can optionally configure Umbraco.Community.PunkTwoFactor via your appsettings.json file.

Custom Issuer & Provider Name

By default, the issuer name shown in authenticator apps is "Umbraco Two Factor Authentication". You can customize it in appsettings.json:

{
    "Umbraco.Community.PunkTwoFactor": {
        "Issuer": "garpunkal.dev",
        "ProviderName": "Two Factor Authentication"
    }
}

Force Two-Factor Authentication

By default, 2FA is opt-in per user. To require 2FA for all backoffice users, set ForceTwoFactor to true:

{
    "Umbraco.Community.PunkTwoFactor": {
        "ForceTwoFactor": true,
        "ExemptUserGroups": ["writer"]
    }
}
  • Behavior: Users without 2FA enabled are prompted immediately on login with a "Two-Factor Authentication Required" dialog that takes them straight to QR code setup. Management API endpoints return 403 Forbidden and the Disable button is hidden until 2FA is enabled.
  • Exemptions: Optionally list Umbraco user group aliases in ExemptUserGroups to exclude specific groups from ForceTwoFactor.
  • Live toggle: Changes to ForceTwoFactor in appsettings.json are picked up automatically without restarting the site.

Compatibility

  • Umbraco 18+
  • .NET 10+

Screenshots

Forced 2FA Prompt

Forced Two-Factor Authentication Prompt

QR Code Setup

Umbraco Backoffice QR Code Setup

2FA Login Verification

Two-Factor Authentication Login Verification


Disclaimer: Use this package at your own risk. It is provided "as is", without warranty of any kind. You are solely responsible for the security, configuration, and testing of your website and Umbraco installation.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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
18.3.2.12 0 11/27/2026
18.3.2.11 0 11/27/2026
18.3.2.10 0 11/27/2026
18.3.2.9 0 11/27/2026
18.3.2.8 0 11/27/2026
18.3.2.7 0 11/27/2026