InBox AutoMFA

Version 7.0.2

Creation date 21/12/2023


This module automatically creates an MFA code when you save or edit a customer.



The following OTRS framework versions are supported:

  • [7.x.x]


The following modules are required:

  • InBox Core 7.0.1 superior

Operational system

The following operating systems are required:

  • [None]

Third Party Software

The following third party software is required:

  • GD::Barcode;
  • GD::Image;


apt update
apt upgrade
apt install build-essential
apt install pkg-config
apt install libgd-dev

cpan GD::Barcode
cpan GD::Image

bin/ Admin::Package::Install /path/to/InBox\ AutoMFA 7.0.2.opm


To use this module, you need to add a dynamic field to your user settings.

  • Copy CustomerUser database backend and settings, in Kernel/Config/

      <- Copy from here
      $Self->{CustomerUser} = {
              Name   => Translatable('Database Backend'),
              Module => 'Kernel::System::CustomerUser::DB',
              Params => {
              Selections => {
      #            UserTitle => {
      #                'Mr.' => Translatable('Mr.'),
      #                'Mrs.' => Translatable('Mrs.'),
      #            },
      <- to here
  • Paste to Kernel/, inside the function Load

      sub Load {
          <- Paste Here
          $Self->{CustomerUser} = {...};
          return 1;
  • Add the following dynamic field configuration on $Self->{CustomerUser}->{Map}:

    ['DynamicField_AutoGenerateToken', undef, 'AutoGenerateToken', 0, 0, 'dynamic_field', undef, 0, undef, undef ],


Defines the email subject


Defines the email template containing the qrcode. The available variables are:

Variable Description
Data.CustomerCompanyCountry Customer company country. Ex: BR
Data.CustomerCompanyComment Customer company comment. Ex: ak ServiceUP
Data.CustomerID Customer ID. Ex:
Data.UserEmail User Email. Ex:
Data.CustomerCompanyStreet Customer company Street. Ex: Av. Rodrigo Fernando Grillo, 207 - Sala 1307
Data.CustomerCompanyCity Customer company City. Ex: Araraquara
Data.UserComment User comment. Ex: também trabalha na serviceUP
Data.UserStreet User street. Ex: Av. Rodrigo Fernando Grillo
Data.UserLogin User login. Ex: ykanegae
Data.UserID User ID. Ex: ykanegae
Data.UserCity User City. Ex: Araraquara
Data.UserMailString User mail string. Ex: Yuri Kanegae
Data.UserFirstname User First Name. Ex: Yuri
Data.LoginLink Login Link. Ex:
Data.ProductName Product Name. Ex: ServiceUP
Data.UserMobile User mobile phone number. Ex: +55 (16) 99999-9999
Data.UserLastname User Last Name. Ex: Kanegae
Data.CustomerCompanyName Customer Company Name. Ex: ServiceUP
Data.UserPhone User phone number. Ex: +55 (16) 3333-3333
Data.UserGoogleAuthenticatorSecretKey MFA Secret Key. Ex: ERADCFBGYL6HT2WZ
Data.UserTitle User Title. Ex: Yuri Kanegae
Data.UserFullname User Full Name. Ex: Yuri Kanegae Yuri Kanegae
Data.UserCountry User Country. Ex: BR
Data.QRCode QRCode Image tag
Data.CustomerCompanyURL Customer Company URL. Ex:

The default template will look like



When creating or changing a user, if you enable the "Auto Generate Token" option and leave the Google Authenticator field empty, it will generate a new token and send to user email.