Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Verify if user is wordpress logged in from another app since wordpress 4.0

Ok i’ve found the solution.

In fact, as i haven’t noticed, there is always the hashed mdp, but for now, the logged_in cookie is structured like this :

%login%|%timeout%|%sessionId%|%passhached%

instead of :

%login%|%timeout%|%passhached%

This is like this since wordpress 4.0, and the wp_session_cookie integration, the auth method is the same that before but there is just 2 change :

  • the sessionid is introduced in the cookie and the key calculation
  • the logged_in cookie encryption is sha256 or if not possible sha1

So there is a scheme of the encryption process

KEY = md5_HMAC(%login%|%caracter 8-12 of the passhached in database%|%timeout%|%sessionId% , LOGGED_IN_KEY.LOGGED_IN_SALT);

RESULT = sha256_HMAC(%login%|%timeout%|%sessionId% , KEY);
// RESULT = sha1_HMAC(%login%|%timeout%|%sessionId% , KEY); only if sha256 is not supported

And for now, to approve a connexion, the logged_in_cookie’s pass hached need to be same as RESULT

Related Posts:

  1. Can someone explain what wp_session_tokens are, and what are they used for?
  2. Log in from one wordpress website to another wordpress website
  3. Is there any way to check for user login and send him to login?
  4. How to store username and password to API in wordpress option DB?
  5. In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
  6. How to properly validate data from $_GET or $_REQUEST using WordPress functions?
  7. Nonces can be reused multiple times? Bug / Security issue?
  8. WordPress and PHP Sessions – Security and Performance
  9. What is the difference between esc_html and wp_filter_nohtml_kses?
  10. Init action hook running late after PayPal’s return url?
  11. How to check WordPress website username and password is correct
  12. Nonce in settings API with tabbed navigation
  13. Problems after wp_set_password() containing an apostrophe
  14. Escaping built-in WP function return strings
  15. What is the difference between strip_tags and wp_filter_nohtml_kses?
  16. WP Cron doesn’t save or in post body
  17. Two-step login process – Is it possible?
  18. How do I approach removing menu items on the fly based on settings in my plugin?
  19. WordPress restrict plugin file direct access
  20. Plugin development: is adding empty index.php files necessary?
  21. Confusion on WP Nonce usage in my Plugin
  22. Coding a plugin on WordPress; when should I sanitize? [duplicate]
  23. Correct way check nonce (security) using old Options API
  24. Why do I need to check if wp_nonce_field() exists before using it
  25. WordPress security issue to output data from user input from theme option form
  26. Proper way to pass credentials in a custom login form to avoid “headers already sent”
  27. External Authentication, session_tokens not destroyed on logout
  28. How to customize login process
  29. Secure Pages Best Practice
  30. wp_insert_user() function password never match
  31. Does wp_login only trigger before an user signs in into the admin panel?
  32. Securing/Escaping Output of file content – reading via fread() in PHP
  33. Logout users upon login, based on caps/role?
  34. Is it possible to make sure that only my plugins output is shown to the enduser?
  35. Password field is empty when using wp_signon();
  36. best way to make a WordPresss multisite that is secure but at the same time supporting my plugin development efforts
  37. Video Security just like facebook [closed]
  38. Plugin Development for registered users
  39. Is disabling test_form in wp_handle_upload a security concern?
  40. How to connect my wordpress plugin to a remote database securely?
  41. wp_nonce_field displaying twice
  42. Enqueue script globally
  43. WP Multisite login not working on one subsite. Possibly cookies/ history issue?
  44. Is it necessary to do validation again when retrieving data from database?
  45. Checking a WordPress for OWASP top 10 vulnerabilities [closed]
  46. How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
  47. add_submenu_page hooked function must explicitly check user capabilities – why?
  48. Are there any security risks when submitting data-attribute data through AJAX?
  49. Why would you use esc_attr() on internal functions?
  50. How do I validate extra pin field on my WordPress login form page?
  51. Is it possible to use WP-CLI in a plugin (or theme)?
  52. Secruity Questions on a timer
  53. How to redirect home page to another page after login for all user?
  54. Using HTML links within translatable string
  55. How can I save a password securely as a settings field
  56. How to share user data across multiple WordPress websites?
  57. Using password protection to load different page elements?
  58. HTML Elements in my WP Plugin being generated in JS. Security and Translated Text Question about this method being used
  59. Allowing duplicating users with same user_login and user_email
  60. How to Login a User inside a Plugin and Redirect to page?
  61. Using custom IDP with WP
  62. Hiding the WordPress login and password fields from login page
  63. How to store sensitive user data (passwords)
  64. How do I make secure API calls from my WordPress plugin?
  65. esc_attr() on hard coded string
  66. how to add security questions on wp-registration page and validate it
  67. redirect_to how to make it simply work with get parameter or similar?
  68. Experts opinions needed: How (in)secure is this approach?
  69. What is more secure checking capabilities of user or checking role of user in WordPress plugin development
  70. Multiple Users Logged In Causing Incorrect Account Returned
  71. Data Validation, dynamically generated fields (select for example)
  72. Get user logged in status from within a plugin. $current_user not defined
  73. Need edit profile link in the menu for logged in users
  74. Create a Custom Login System in WordPress [closed]
  75. how can I insert a link on login page
  76. user can login from single account detail from multiple locations(computer) at the same time [closed]
  77. esc_url, esc_url_raw or sanitize_url?
  78. how to works woocommerce cart hash
  79. How do I debug an error that a plugin is causing?
  80. Adding an external stylesheet to a plugin
  81. Ajax +wordpress onClick link redirect to new page and create html content
  82. WP_NAV_MENU filter targets all menus
  83. Clean way to initialize plugin in newly-added site when plugin has been network activated?
  84. Get section of input passed to the sanitize_callback
  85. wp_ prefix changed. What is the way to change so any prefix is understood?
  86. If $var is empty, return 404.
  87. How to replace settings in WordPress plugin from a theme
  88. Forward an old url rewrite scheme to a new one?
  89. Use options to control jQuery plugin
  90. Save temporary registration data
  91. Including template in shortcodes
  92. Activate / Deactivate plugin
  93. Is there a WordPress plugin to design WebGL? [closed]
  94. $wpdb in php 5.5
  95. how to display a string in admin_notices hook from a class plugin
  96. How to add a route?
  97. Create an user on external database
  98. Should I put my plugin javascript inline?
  99. Adding Dynamic Stylesheet
  100. Form submission to another page returning 404 error [duplicate]
Categories plugin-development Tags login, plugin-development, security
WordPress add_rewrite_rule() cannot visit lower url levels
Remove the link from the thumbnail and product title on woocommerce

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress