phpBB two factor authentication

This extension adds support for two factor authentication using several different security keys. Currently, the following security keys are available by default:

  • U2F (See below)
  • Google authenticator (Or compatible)
  • Backup keys


Like with any extension, upload the package to the ext/ directory of your board. For more information about installation, updating and removing extensions please read this page on

Browser support

To implement some of the support authentication methods (Like U2F), it is required to have support for this in your browser. Currently, this extension only support Google Chrome (Version 41 and later) with U2F, with FireFox coming in a later release. Other browsers are currently not suupported with U2F keys. Please note that a secure connection is also required to use U2F.

Providing translations

Translations can be provided as pull request to the github repository.

Adding extra Two Factor modules

This extension can be extended by other extensions to add more Two Factor Authentication modules. A few steps are required to implement extra modules.

Please note that I won't be providing support for additional modules provided by other extensions.


In your service.yml, add a new service with the following definition (If you need more parameters injected, modify this service)

        class: acme\tfa\modules\otp
            - '@dbal.conn'
            - '@user'
            - '@request'
            - '@template'
            - '%acme.2fa.tables.tfa_otp_registration%'
            - { name: paul999.tfa.module }

The DB, user and template dependencies are required if you use the provide abstract class (Which is highly suggested). The table is optional but your module will probably need some table. You should not change the tags definition. The tags are used by the main extension to tell that this is a Two Factor Authentication module.

Adding your service

The service you need to implement has a few requirements. The most important one is that it should implement the module_interface. To make implementing the module easier it is suggested to extend from the abstract_module class (Which already implements the interface). The abstract module provide two helper methods that can be used within your module.

The interface itself is documented within the code. Make sure to read the provided phpdoc properly, as some of them look the same, but have very specific differences. All methods from the interface are required to be implemented by the module, the abstract module only provides helper methods.

Once you implemented all methods, and enabled your extension, the method should show up automatically in the UCP when you have done everything correctly.


Fork me on GitHub