• Resolved Dipesh

    (@dipeshpatel780)


    Hi,

    We can’t login our affiliate account after 2FA enable. We have enable 2FA via wordfence for all users. We are using slice-WP login page for login.

    Error message “Unable to login. Please try again.”

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @dipeshpatel780,

    Thank you for reaching out! From the sounds of it, this might be a compatibility issue between the two plugins.

    I’ll run a few tests to see exactly what is happening. As soon as I know more, I’ll get back to you here with details.

    Please note that these tests can take some time, so it could take up to 24 hours for me to get back to you with concrete information. I wanted you to be aware of this and also to confirm that we’re looking into the issue.

    Thank you and best wishes,

    Mihai

    Plugin Author iova.mihai

    (@iovamihai)

    Hey @dipeshpatel780,

    I just managed to do a few tests and explore the Wordfence code. It seems that their 2FA is quite hardcoded and exposing it to our login form is not easy.

    I’ve also tested their 2FA with other plugins that offer login functionality and in all cases the same issue appeared as in SliceWP.

    Considering this, the only thing that I can recommend currently is to disable the 2FA for SliceWP’s login form. Unfortunately, at this time, this can only be done via custom code. Here’s the code:

    function slicewp_custom_disable_wordfence_2fa_on_login() {
    	
    	if ( empty( $_POST['slicewp_token'] ) ) {
    		return;
    	}
    	
    	if ( ! wp_verify_nonce( $_POST['slicewp_token'], 'slicewp_login_affiliate' ) ) {
    		return;
    	}
    
    	if ( ! class_exists( '\WordfenceLS\Controller_WordfenceLS' ) ) {
    		return;
    	}
    
    	remove_filter( 'authenticate', array( \WordfenceLS\Controller_WordfenceLS::shared(), '_authenticate' ), 25, 3 );
    	
    }
    add_action( 'init', 'slicewp_custom_disable_wordfence_2fa_on_login', -1 );

    The code above will remove the 2FA from the SliceWP login form. All other forms will continue supporting the Wordfence 2FA.

    Please copy the code and add it to your website. If you’re not sure how to add code snippets to your site, you can use the Code Snippets plugin (https://www.ads-software.com/plugins/code-snippets/).

    At the moment, this is the best we can do. Even so, I’ve added this issue to our development log for more research.

    Thank you and best wishes,

    Mihai

    Thanks guys, I had this problem as well. I started up and had over 100 sign ups over night, so i guess they were all bots as I had Wordfence 2FA off to allow the Slice captcha to work. Will try a different setting with the code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t login account if 2FA is enable’ is closed to new replies.