Picture of DNN9 Google Authenticator 2FA Login

DNN9 Google Authenticator 2FA Login

posted by rorfun - 06/21/2019

This Membership Provider allows users log into the system by using Google Authenticator as 2nd authentication factor. It adds an additional layer of security to DNN's authentication process by making it harder for attackers to gain access to your user's online accounts.

Install the extension as per normal and logout the system after the installation. The login module will then be able to provide 2FA feature for your site. You can edit the configuration in web.config to decide which roles you want 2FA to take effect.

After you enter correct user credentials, you will first receive an email that includes a QR Code to be added to your Google Authenticator mobile App. After that a modal window will popup to allow you to input code generated by Google Authenticator mobile App. In the event that user changes email address, a new QR Code will be sent to the new email address when first login into the site. Steps:

1. You install the module and logoff, followed by login the site again. You will receive an email with QRCode
2. You download Google Authenticator (android/ios app) from Google Player (Android phone) or App Store (iPone)
3. You click + button of the app and select Scan a barcode
4. You scan the QRCode in the email 
5. Now, Google Authenticator added an entry with code, which refresh every 30 seconds.
6. You will use the code generated to enter the site. 

For some reason, you may not setup smtp server for your system. In this case, you can find the secret from user account's profile, "GAKey" property (record is in userprofile table). You can then manually add it to your Google Authenticator App.

You may take a look of installation and usage via:


The module works for all versions of DNN9+ (including latest release version)

For DNN9.3.*, you have to download fixed DotNetNuke.Website.dll from the download area together with the module, as there is a bug in DNN9.3.* release.


Please note that your use of the module doesn't require the server to have an Internet connection, as Google Authenticator doesn't rely on Internet to work.