Umbraco 2FA is a two factor authentication solution for Umbraco 7.6+ by Offroadcode. With it you can configure your Umbraco site to utilize Google Authenticator to provide two factor authentication when logging into the Umbraco backoffice.
Installation & Setup
Note!: Umbraco 2FA only works for Umbraco 7.6 and greater. Do not install on earlier versions.
Installing Package to Umbraco
You can install the Umbraco 2FA package to Umbraco via these following steps:
- Download the package zip file.
- In your Umbraco back office, navigate to Developer > Packages and click the "Install Local" icon in the upper right of the page.
- Either drag the zip file onto the provided frame or click on the "or click here to choose files" link and select the zip file using your file explorer.
Setting Up Authentication
The Umbraco 2FA tab will appear as a tab in the Content section of the backoffice after installation.
Each user may enable 2FA for their account by performing the following steps:
- Go to the Umbraco 2FA tab in Content.
- Click on the 'Setup 2FA' button.
- Open your Google Authenticator app on your smartphone (Google Play for your Android phone or iTunes for your iPhone), or a similar authenticator app, and select to add a new account by either barcode scan or manual entry.
- If using barcode scan, scan the QR code on your screen. If using manual entry, enter the long string beneath the QR code.
- Your Google Authenticator will display a 6-digit code. Enter this ento the text field and click "Verify".
- Congrats! You now have 2FA configured on your Umbraco account.
To remove 2FA on your account, you can return to the Umbraco 2FA tab and click "Remove Authenticator".
When a user's account is configured with 2FA, any time they log into their account they will be prompted with a request for their Two Factor authentication code after entering their username and password. This code will be displayed on the authenticator that they are using.
Contributing Code to Umbraco 2FA
The following is a guide for setting up the Umbraco 2FA source code on your machine if you wish to help develop it.
Requires Node.js to be installed and in your system path
npm install -g grunt-cli && npm install -g grunt npm install
Builds the project to /dist/. These files can be dropped into an Umbraco 7 site, or you can build directly to a site using:
But if you do build directly into a site, you'll need to add the following to its
/Config/Dashboard.config file so the custom section's dashboard will show:
<section alias="umbraco2FA"> <areas> <area>umbraco2FA</area> </areas> <tab caption="Umbraco2FA"> <control>/App_Plugins/Umbraco2FA/views/dashboard.html</control> </tab> </section>
You can also watch for changes using:
grunt watch grunt watch --target="D:\inetpub\mysite"
If you want to build the package file (into a pkg folder), use: