Binom Documentation

К навигации

Two-factor authentication

You can configure your tracker so that you can login only with a one-time password. This mechanism is called two-factor authentication (2FA) and allows you to protect your tracker better than a normal password.

Activation

To activate two-factor authentication, you need to go to Settings – 2FA.

2FA works through Google Authenticator, so make sure that you already have (iOS/Android)app on your device.
To turn 2FA on you need to scan the QR code or enter Secret Key into the application. After that, enter the code from Google Authenticator in the Enter Code Code field and click

Be careful, without a one-time code you will not be able to login into the tracker, so we recommend you to save the QR-code picture or Secret Key so you could reconnect new device if the old one is lost.

DISABLING

To turn 2FA off, simply click on the button
If there are several users, in the tracker, then any administrator can disable 2FA in the settings of a particular user:

API and 2FA

To work with API and 2FA, you need to add a new parameter to the link/query code= and value generated by this function:

                
                  <?php
echo get2FACode('YOURTRACKERCODE');
function get2FACode($a){
$c=array_flip(array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','2','3','4','5','6','7','='));
$b=str_split($a);
$d='';
for($i=0;$i<count($b);$i=$i+8){
$x='';
for($j=0;$j<8;++$j){ $x.=str_pad(base_convert(@$c[@$b[$i+$j]],10,2),5,'0',STR_PAD_LEFT); }
$e=str_split($x,8);
for($z=0;$z<count($e);++$z){ $d.=(($y=chr(base_convert($e[$z],2,10)))||ord($y)==48)?$y:''; }
}
$f=hash_hmac('SHA1',(chr(0).chr(0).chr(0).chr(0).pack('N*',floor(time()/30))),$d,true);
$g=unpack('N',substr($f,ord(substr($f,-1)) & 0x0F,4));
return str_pad(($g[1] & 0x7FFFFFFF)%pow(10,6),6,'0',STR_PAD_LEFT);
}
?>
where instead of YOURTRACKERCODE you need to specify your Secret Key from tracker settings.

Want to help us improve this documentation page? Create a pull request