It's better when it's simple

User Tools

Site Tools


Two Factor Authentication - Google Authenticator Plugin

Compatible with DokuWiki

  • 2020-07-29 "Hogfather" unknown
  • 2018-04-22 "Greebo" unknown
  • 2017-02-19 "Frusterick Manners" yes
  • 2016-06-26 "Elenor Of Tsort" yes

plugin Google Authenticator support plugin for the Twofactor authentication plugin.

Last updated on


This module provides the Two Factor Authentication plugin with the needed functionality to use Google Authenticator as a means to provide login tokens.


Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

This plugin requires configuration prior to being functional. By default it is off and will need to be turned on.


As of 2018-06-28, I have changed one of the methods in the main twofactor module that breaks all prior versions of this module. I have updated all the modules, so as long as you update ALL twofactor modules, this should not be an issue.

User Setup

In order to use Google Authenticator(GA), the user will have to setup the wiki and GA to work together. This can be done through the Two Factor configuration link at the upper right menu.

Once at the Two Factor configuration page, there will be a checkbox to enable use of GA. Click the “Save” button, and the wiki will present a QR code that can be used with GA. Scan the QR code with GA to sync GA with the wiki. Last, you will need to verify that GA is setup correctly by entering a token from GA into the verification textbox and clicking the “Save” button again.

Once GA and the wiki are synced, the QR code will remain on the configuration page so other devices may be synced with the wiki. The user can also check the “Revoke Google Authenticator” option and click “save” to revoke that code. In order to use GA to authenticate after that, the user will need to create a new QR code and resync GA and the wiki.

User Login

At login, the user will supply their GA token along with their username and password. If the user has configured other modules for two factor authentication, the token field may be left blank to use those other methods.

Configuration and Settings

“enable” - Turn on or off the use of Google Authenticator for two factor authentication. Default: off


There is no additional development planned for this plugin at this time.

Change Log

Known Bugs and Issues

None at this time. Law of odds says someone will find something broken soon.

ToDo/Wish List

None at this time


WIP. I will pull discussion questions and post them here as blatant questions come up.

Big Thanks / Acknowledgement

First, I want to thank my employer, Antelope Valley College, for allowing me to release this code to the open source community.

A big thanks goes out to Dan Popp for the work on his Google 2FA pluginauthgoogle2fa Plugin- it provided me with the idea, libraries, and a code template to get this project started.

I make use of the PHP Gangsta Google Authenticator class by Michael Kliewe (BSD) and the PHP QR Code library (LGPL3). My thanks to them for enabling this plugin to be a reality.


Feel free to write anything constructive. My hope is that this plugin will provide many admins with useful functionality.

If on a debian system - ensure that php5-gd is installed, otherwise it will just display a blank page instead of the authenticator image.

plugin/twofactorgoogleauth.txt · Last modified: 2018-06-28 03:54 by wilminator