diff --git a/basic-auth.php b/basic-auth.php index 805918c..7e02807 100644 --- a/basic-auth.php +++ b/basic-auth.php @@ -33,10 +33,12 @@ function json_basic_auth_handler( $user ) { * filter during authentication. */ remove_filter( 'determine_current_user', 'json_basic_auth_handler', 20 ); + remove_filter( 'authenticate', 'wp_authenticate_spam_check', 99 ); $user = wp_authenticate( $username, $password ); add_filter( 'determine_current_user', 'json_basic_auth_handler', 20 ); + add_filter( 'authenticate', 'wp_authenticate_spam_check', 99 ); if ( is_wp_error( $user ) ) { $wp_json_basic_auth_error = $user;