• Resolved ted_smith

    (@ted_smith)


    Please help!

    Installed the app, but must have gone wrong somewhere in the settings. I logged out after installation and then went to log in. Enter UN and PW and then it asks for the code. I generate a code using Google Authenticator by scanning a screenshot that I (luckily) took of the QR code after installing the plugin. QR codes are generated OK but when I enter them the site keeps telling me : Error: The one-time password (TFA code) you entered was incorrect.

    So I tried disabling the plugin by adding define(‘TWO_FACTOR_DISABLE’, true); to my wp-config.php file and uploaded to the site, overwriting the original. It now no longer asks for the TFA code, but shows a quick “clock” type icon and then reports the same error : Error: The one-time password (TFA code) you entered was incorrect.

    So the plugin is still activated and asking me for TFA credentials.

    So I am totally locked out!!

    Help!

    (ps…there’s a serious copy and paste issue (https://www.ads-software.com/plugins/two-factor-authentication/#faq) in that the ‘ char of define(‘TWO_FACTOR_DISABLE’, true); takes a different form on Linux text editors. I only noticed because the value TWO_FACTOR_DISABLE was black instead of pink in gedit. So I deleted the ‘ and replaced it using keyboard and then it went pink. I think it’s a HTML unicode thing vs ASCII thing. )

    • This topic was modified 7 years, 4 months ago by ted_smith.
    • This topic was modified 7 years, 4 months ago by ted_smith.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author David Anderson

    (@davidanderson)

    Where in your wp-config.php file did you add it? If it takes no effect, then that probably means you added it at the end, too late to take effect. Add it after the opening <?php just after the beginning.

    David

    Plugin Author David Anderson

    (@davidanderson)

    N.B. Also – make sure you’re using straight single quotes; not the curly quotes that the www.ads-software.com website unhelpfully replaces the single quotes with!

    Thread Starter ted_smith

    (@ted_smith)

    Oh THANK YOU!! You have saved my bacon!! Yes, that worked, when I moved the entry to the top of the config file, immediately after the opening php brackets, it worked.

    Your guide does say “Add it next to where any other line beginning with “define” is”. So I just put it in the middle somewhere after some of the others. Maybe make it clear it needs to go at the top.

    OK, so, now I need to look at where I went wrong the first time. Thanks again for your rapid help.

    • This reply was modified 7 years, 4 months ago by ted_smith.
    • This reply was modified 7 years, 4 months ago by ted_smith.
    Plugin Author David Anderson

    (@davidanderson)

    Hi Ted,

    Great!

    If you put it next to other define statements, and it took no effect, then your wp-config.php also has other define statements that’ve been put in at some point, which are taking no effect!

    David

    Thread Starter ted_smith

    (@ted_smith)

    Once I was back in, I noticed the following in the plugin : Generating two-factor codes depends upon your web-server and your TFA app/device agreeing upon the time. The current UTC time according to the server when this page loaded: 2017-07-27 11:18:17, and in the time-zone you have configured in your WordPress settings: 2017-07-27 12:18:17

    So I changed the time back to UTC-0 as I assumed that must be the problem, with the one hour daylight saving. I then reverted wp-config.php back to how it was and reuploaded etc etc but it still won’t login despite generating several new codes.

    So for now I have just disabled the plugin…my nerves can’t take it! Thanks for the plugin anyway – it is obviously very good for a lot of people, but just for me and my site I seem to have problems.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Totall locked out and define(‘TWO_FACTOR_DISABLE’, true); not working!’ is closed to new replies.