Integrate recaptcha and wp_signon – what is needed?

Question

I’ve been using wp_signon for a long time in a project:

//Do the actual login for WP User
$creds = array();
$creds['user_login'] = $skuser_name;
$creds['user_password'] = $skuser_pass;
$creds['remember'] = true;
$user = wp_signon( $creds, false ); 

This have been working for a long time. I recently added plugin Wordfence which included recaptcha (invislbe) for login and registration forms and those obviously do work.

After installation of that plugin my custom loginforms with code above did not work. After some research I figured out that it was the recaptcha in combination with my custom loginform that is uses wp_signon that was the issue.

I get the error (when using correct username and password):

//VERIFICATION REQUIRED: Additional verification is required for
login. Please check the email address associated with the account for
a verification link.

When I deactive recaptcha which is included in WordFence – plugin -> my custom loginform does work.

I have keys that are needed for the actual recaptcha but I can’t figure what I have to do to integrate this with wp_signon!? Is it possible to recaptcha with wp_signon or do I have to create a custom wp_signon function?

Please point me in right direction! Thank you!

0
, , bestprogrammerintheworld 4 years 2020-03-26T16:52:43-05:00 0 Answers 87 views 0

Leave an answer

Browse
Browse