TOTP 2FA Login & Country Filter



Activate a second factor to user authentication when login to Dolibarr with the standard TOTP (Time-based One-Time-Password), compatible with TOTPs generators Authy, Google Authenticator, etc. or get it by email. You can also restrict login from a list of countries.

More details

10,00 €

More info

Module version: auto
Publisher/Licence: Sergi Rodrigues (IMASDEWEB) / GPL3
User interface language: English / Catalan / Spanish / German / French

  • Dolibarr min version: auto
  • Dolibarr max version: auto

Module features: (User guide)

  • It show on usual Dolibarr login page a third text input control to put a TOTP 6-digit code.
  • This 3rd control must be populated by users which have enabled this Two Factor (2FA) system.
  • So it is a 6-digit code optional: some users can have it enabled but others not.
  • Only is possible to enable the 2FA by the same user. Admin users cannot do it.
  • Admin users (or users with assigned permissions over other users) can ONLY know which other users has enabled the 2FA and disable it.
  • The only one who can see the TOTP secret key is the corresponding user.
  • The module always show to the user its secret key and the QR code to be scanned by a mobile app.
  • When activating 2FA for your user you can set manually your secret TOTP key, specially useful to administer several Dolibarr instances.

Bonus features:

  • [version 1.4] Defining a white list of countries, you can restrict the login to visitors with IPs belonging to them (you need have enabled mod_geoip in PHP).
  • [version 1.5] You can set a period of time (1 day/week/month or never) to remember a logged device as safe.
  • [version 1.7] You can enable the possibility of request an email with the 6-digit code from login page.
  • [version 2.0] You can upload a free IP-country-geolocation database from MaxMind to be able to apply "country filtering" independent of your server configuration.

How to install:

  1. Download the archive file of module (.zip file) from web site
  2. Create the directory: /htdocs/totp2fa into the root of Dolibarr.
    Alternative: /htdocs/custom/totp2fa
  3. Put the content of the ZIP file into that directory
  4. On your Dolibarr panel enable the module: Setup -> Modules
  5. Upload a MaxMind free database through module settings to be able to apply Country filter.

How to update your installed module:

  1. Replace the content of the module's directory on your server by the new version files on the ZIP file.
  2. Got to Setup > Modules on Dolibarr and Disable module and Enable again.
  3. Visit the settings of the module ("gear" icon) and check the settings (usually there are new ones).
  4. At least make ONE SUBMIT of this settings form (then the database will take at least default values for new settings).

How to temporally disable module if you have problems to LOGIN:

  1. Rename the directory containing the module (for example through FTP). It's enough to add a dash (ie. "totp2fa" to "_totp2fa")
  2. Then you will be able to login without interference from the module

List of my modules for sale:

  1. TOTP 2FA Login
    (Two-factor authentication for login)
  2. Solarized Theme
    (Solarized Dark & Light Theme, based on Eldy official theme)
  3. Dark Theme
    (Dark Theme, based on Eldy official theme)
  4. Stock transfers
    (make easier to move stock between your warehouses)
  5. Purchases
    (make easier to compare prices from suppliers and make purchase orders)