It's better when it's simple

User Tools

Site Tools


Two Factor Authentication - SMS Gateway Plugin

Compatible with DokuWiki

2015-08-10a "Detritus", 2016-06-26 "Elenor Of Tsort", 2017-02-19b "Frusterick Manners"

plugin SMS email gateway support plugin for the Two Factor Authentication plugin.

Last updated on

This extension is marked as obsoleted. Therefore it is hidden in the Extension Manager and the extension listing. Furthermore, it is candidate for removal.

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to twofactoremail, twofactorsmsappliance

Tagged with !obsolete, 2fa, authentication, email, security, sms, two-factor

:!: This plugin is not compatible with the current twofactor plugin.


This module provides the Two Factor Authentication plugin with the needed functionality to send emails to SMS gateways as a means to provide one-time passwords.


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.

Additionally, there is a gateway.txt file in the plugin folder. This file contains a list of “email” addresses that are used to send emails to various cell phone providers' SMS gateways. The format is <displayed provider name>@<gateway domain>. If a provider is not listed, they can be added to the file using that same format. The gateway must be configured to receive emails for <phone number>@<gateway domain>, such as


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 the SMS gateway, the user will have to configure the wiki to send passwords by SMS. 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 textbox for the user's cell phone number and a dropdown menu for the cell phone provider. Enter the phone number to use, the provider for that number, and click “Save” to send a test message to the phone. Last, enter the password sent to the phone into the verification textbox and clicking the “Save” button again. If needed, click on the “Resend Password” button to send another password to the phone.

The phone number can be updated, and the user will need to verify that the new number supplied can receive the sent passwords. The user can also check the “Revoke codes by SMS gateway” option and click “Save” to disable sending passwords to the phone.

User Login

The user logs in normally. If there is a field to supply a token, leave it blank to have the wiki send a one-time password. The user will be redirected to a screen to supply the sent password. Enter the password in the Verification Code field and click “Complete Login” to continue. If the password is not received within a minute or two, clicking on the “Resend Code” button will send a new password. If more than one module is configured to send passwords, the user can have the same password sent using all configured modules by checking the “Resend OTP using all configured options” checkbox then clicking on “Resend Code”.

Configuration and Settings

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


There is no further development planned at this time, but it may change based on feedback.

Change Log

Known Bugs and Issues

None at this time

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.


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

plugin/twofactorsmsgateway.txt · Last modified: 2022-04-07 16:25 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki