alexandregz / twofactor_gauthenticator

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

30 days remember me problem #137

Closed NicoloLazzaroni closed 3 years ago

NicoloLazzaroni commented 3 years ago

Hello, I have the same problem some people described. When I login to my RC the "Remember for 30 days" button does not appear. It does, however, appear if I:

  1. With 2FA active login into my account until I have the page insert 2FA code, reload the page with the small round reload button on the url bar.
  2. From the error page I am now in, click on the URL address and press enter, to reconnect to the page without resending the same datas.
  3. Login again.
  4. Now I have the button.

RC Version: 1.4.10 Updated Plugin Version: Last Release

NicoloLazzaroni commented 3 years ago

Update: Seems a problem with if(rcmail.env.allow_save_device_30days){ After obscuring this if statement it shows up. Maybe it does not manage the variable properly?

Temporary Solution: In twofactor_gauthenticator_form.js

Change from:

    if(rcmail.env.allow_save_device_30days){
                text += '<tr>';
                text += '...'</label></td>';
                text += '</tr>';
     }

To:

    //if(rcmail.env.allow_save_device_30days){
                text += '<tr>';
                text += '...'</label></td>';
                text += '</tr>';
     //}

PS: This will ALWAYS show the form, even if you disable it in the config.

Best Regards