Title: 2FA Persistent
Last modified: August 25, 2021

---

# 2FA Persistent

 *  Resolved [laserstore](https://wordpress.org/support/users/laserstore/)
 * (@laserstore)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/2fa-persistent/)
 * Hi guys!
    Thanks for the great work on the plugin. I’ve been using it for some
   time and was surprised by the excellent quality. I would just like to leave an
   issue here that could perhaps be improved. Whenever I authenticate with the code
   2FA, it goes back to the login screen stating that the username and password 
   are not filled in, so I redo the process two or three times and access is granted.
   Could this be some incompatibility with some plugin? Thanks a lot WPMUDEV!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/2fa-persistent/#post-14804517)
 * Hi [@laserstore](https://wordpress.org/support/users/laserstore/)
 * I hope you’re well today!
 * Yes, it would definitely be a conflict/incompatibility with other plugin. One
   that we are already aware of is “WooCommerce Payments”.
 * A fix for it should be included in one of upcoming updates (though I don’t yet
   have an ETA).
 * If you are using this plugin on your site, there’s a “patch” that should help.
   To apply it you would need to add this code to your site:
 *     ```
       <?php 
       function wpmudev_set_cookie_on_current_request( $cookie ) {
           if ( ! is_user_logged_in() && isset( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
               unset( $_COOKIE[ LOGGED_IN_COOKIE ] );
           }
       }
   
       add_action( 'set_logged_in_cookie', 'wpmudev_set_cookie_on_current_request', 999);
       ```
   
 * Best way would be to add it as “MU plugin”:
 * – create an empty file with a .php extension (e.g. defender-auth-patch.php)
    –
   copy and paste code into it – upload it to the /wp-content/mu-plugins folder 
   of your site’s WordPress installation
 * That said, if you are not using aforementioned plugin you can also try this code
   but if it doesn’t help, a full conflict test would be necessary to identify the
   plugin conflicting on your site and then, knowing about it, our developers could
   work out a fix for it too.
 * Best regards,
    Adam
 *  Thread Starter [laserstore](https://wordpress.org/support/users/laserstore/)
 * (@laserstore)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/2fa-persistent/#post-14804826)
 * Hey [@wpmudev-support8](https://wordpress.org/support/users/wpmudev-support8/)
   thank you very much!
 * I followed your instructions and apparently the problem was solved really, even
   though I didn’t use the plugin you mentioned at the beginning. In this case, 
   when there is an update of your plugin, can I delete this file?
 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/2fa-persistent/#post-14807798)
 * Hi [@laserstore](https://wordpress.org/support/users/laserstore/)
 * I’m happy I helped!
 * As for removing the file, I’m afraid I’m not yet sure in which upcoming update
   there’ll be a permanent fix included – whether it will be the nearest one or 
   later.
 * It should be mentioned in plugin’s change log upon update but the safest solution
   would be to just update plugin, remove that file and test – if the issue still
   happens, put the patch file back and try again after next update.
 * Best regards,
    Adam
 *  Plugin Support [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * (@wpmudev-support9)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/2fa-persistent/#post-14847877)
 * Hello [@laserstore](https://wordpress.org/support/users/laserstore/) !
 * Hope you’re having a good day!
 * Looks like the issue is resolved now so I’ll go ahead and mark the ticket as 
   such. Of course if you need any additional help – please let us know.
 * Kind regards,
    Pawel

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘2FA Persistent’ is closed to new replies.

 * ![](https://ps.w.org/defender-security/assets/icon-256x256.gif?rev=3435930)
 * [Defender Security - Malware Scanner, Login Security & Firewall](https://wordpress.org/plugins/defender-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/defender-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/defender-security/)
 * [Active Topics](https://wordpress.org/support/plugin/defender-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/defender-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/defender-security/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/2fa-persistent/#post-14847877)
 * Status: resolved