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