alexandregz / twofactor_gauthenticator

This RoundCube plugin adds the 2-step verification(OTP) to the login proccess
MIT License
216 stars 76 forks source link

Allow Save Device 30 Days not working on Roundcube 1.4.2 #111

Open tbruyere opened 4 years ago

tbruyere commented 4 years ago

I activated the option :

$rcmail_config['allow_save_device_30days'] = true;

But the checkbox "Rember 2FA" is not display on the login.

I think the problem comes from the set_env method.

// settings we will export to the form javascript
                $this_output = $this->api->output;
                if ($this_output) {
                        $this->api->output->set_env('allow_save_device_30days',$rcmail->config->get('allow_save_device_30days',true));
                        $this->api->output->set_env('twofactor_formfield_as_password',$rcmail->config->get('twofactor_formfield_as_password',false));
                }

The javascript test is false : if(rcmail.env.allow_save_device_30days){

alexandregz commented 4 years ago

Checked with 1.4.3, "remember 2FA" option appears and checked it works fine