Title: Login return false
Last modified: August 22, 2020

---

# Login return false

 *  Resolved [bilalmubdir](https://wordpress.org/support/users/bilalmubdir/)
 * (@bilalmubdir)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/)
 * Hi,
 * I’m using a function my custom plugin to login via an API. The login process 
   is using wp_signon function with nonce (_wpnonce) and redirection. The issue 
   that when I log in with nonce and JetPack plugin active, the function return 
   0. When I disabled JetPack, it works perfect and return user data.
    If I logged
   in without nonce also it works seven if JetPack active.
 * I appreciate it in advance if could find the issue to make them both works together.
 * Regards

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

 *  Plugin Contributor [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13296356)
 * What is the URL of the site with the problem, and if WordPress.com Secure Sign
   On is on [https://jetpack.com/support/sso/](https://jetpack.com/support/sso/)
   does it work with that switched off?
 *  Thread Starter [bilalmubdir](https://wordpress.org/support/users/bilalmubdir/)
 * (@bilalmubdir)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13296407)
 * I’ve disabled Secure Sign on and all JetPack modules but the problem still insist
   until I deactivate the whole plugin.
 * The url is [http://www.uruktech.com](http://www.uruktech.com)
 * Noting that I’v installed an old version of JetPack and issue solved but the 
   old version in incompatible with many other plugins and services where it cause
   many issues fo me.
 *  Plugin Contributor [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13296482)
 * Which version of Jetpack is it working under?
 *  Thread Starter [bilalmubdir](https://wordpress.org/support/users/bilalmubdir/)
 * (@bilalmubdir)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13296492)
 * I tried 6.0 and 7.1 both are OK but they are not compatible with some other plugins.
 *  Plugin Contributor [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13296505)
 * What versions of WordPress and PHP is your site running?
 *  Thread Starter [bilalmubdir](https://wordpress.org/support/users/bilalmubdir/)
 * (@bilalmubdir)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13296525)
 * WordPress is the latest version, PHP is 7.3.16
 *  Plugin Support [KokkieH](https://wordpress.org/support/users/kokkieh/)
 * (@kokkieh)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13302869)
 * I see you still have Jetpack Protect enabled. Does disabling that module make
   any difference?
 *  Thread Starter [bilalmubdir](https://wordpress.org/support/users/bilalmubdir/)
 * (@bilalmubdir)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13303878)
 * For now the plugin is active because I need it for Woocommerce analytic mobile
   app.
 *  Plugin Contributor [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13306509)
 * Don’t disable Jetpack entirely, just the Protect module: [https://jetpack.com/support/protect/](https://jetpack.com/support/protect/)
 * With that disabled, try upgrading to Jetpack 8.8.2 again.
 *  Thread Starter [bilalmubdir](https://wordpress.org/support/users/bilalmubdir/)
 * (@bilalmubdir)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13308184)
 * No I have Jetpack 8.8.2 and I have disabled this module, the same issue happen
 *  Plugin Support [KokkieH](https://wordpress.org/support/users/kokkieh/)
 * (@kokkieh)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13309041)
 * If Protect and Jetpack SSO are both disabled, I don’t see how Jetpack can be 
   blocking logins to your site, so this might be an issue on the API’s end itself.
 * Can you ask in the advanced forum if anyone from that end has any ideas?
 * [https://wordpress.org/support/forum/wp-advanced/](https://wordpress.org/support/forum/wp-advanced/)
 *  Thread Starter [bilalmubdir](https://wordpress.org/support/users/bilalmubdir/)
 * (@bilalmubdir)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13309340)
 * Dear KokkieH,
 * In my first post I had mentioned that “The login process is using wp_signon function
   with nonce (_wpnonce) and redirection. The issue that when I log in with nonce
   and Jetpack plugin active, the function return 0. If I logged in **without nonce**
   also it works seven if Jetpack active.
 * So it is jetpack issue, with old version of the plugin there is no issue.
 * Where my api function simply is:
 *  public function login()
    { $creds = array( ‘user_login’ => addslashes(rawurldecode(
   $_REQUEST[‘username’])), ‘user_password’ => addslashes(rawurldecode($_REQUEST[‘
   password’])), ‘remember’ => true, );
 *  $user = wp_signon( apply_filters( ‘woocommerce_login_credentials’, $creds ),
   is_ssl() );
 *  wp_send_json( $user );
 *  }
 *  Plugin Support [KokkieH](https://wordpress.org/support/users/kokkieh/)
 * (@kokkieh)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13315696)
 * We’re not able to help with custom code implementations like this, and based 
   on the information you’ve provided we don’t have enough data to confirm that 
   this is being caused by Jetpack.
 * You can view the code Jetpack uses at [https://github.com/automattic/jetpack](https://github.com/automattic/jetpack).
   Check what Jetpack features might be interacting with your code via filters (
   different features such as Protect or SSO rely on hooks inside the core login
   functionality such as `wp_authenticate` or `wp_login`), disable said feature 
   to see if one in particular appears to conflict with your code, and then try 
   to understand why the conflict happens.
 * If you find a bug with the Jetpack implementation, you can then open an issue
   directly in that GitHub repo to report this to our developers.

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

The topic ‘Login return false’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [login](https://wordpress.org/support/topic-tag/login/)
 * [nonce](https://wordpress.org/support/topic-tag/nonce/)
 * [signon](https://wordpress.org/support/topic-tag/signon/)

 * 13 replies
 * 3 participants
 * Last reply from: [KokkieH](https://wordpress.org/support/users/kokkieh/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/login-return-false/#post-13315696)
 * Status: resolved