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

Programmatic Login from 3rd Party site

From what I can tell, what I was trying to do is not possible.

The cURL request never actually touches the browser, it goes from the web app server to the wordpress site server so there in that context the web app server is the client. So when the redirect happens, the cookie is not set in the browser.

What I’ve done instead is a GET request passing my tokenized values in the query string. It’s not as secure this way as anyone who gets their hands on the token will technically be able to access the site and login but there doesn’t appear to be a way around that. At least the tokenized URL is never actually visible in the address bar so the typical user will not know what’s happening.

Related Posts:

  1. Changing user_nicename
  2. automated tests as a user?
  3. Creating login session via CURL
  4. User management system similar to wordpress one?
  5. Change CSS based on is_user_logged_in
  6. Admin Panel 404 Error after login
  7. How to block specific user id in custom login form?
  8. Call WP Rest-Api to GET /users/me returned NOTHING in console
  9. is_user_logged_in() not working in homepage
  10. List users in a dropdown for login
  11. rest_cannot_create_user – Sorry, you are not allowed to create new users. CURL WORDPRESS REST API
  12. User registration followed by automatic login
  13. Adding “Remember Me” in custom login
  14. cURL 28 error after switch from to brew php 7.2 on localhost
  15. Display user’s total comment count outside The Loop
  16. Creating a post with the REST API, curl and oauth returning 401 error
  17. Change the footer text on the login page
  18. Can i check if user is doing any ajax request?
  19. How do I create a WP user outside of WordPress and auto login?
  20. How to place login logout link on menu that redirects users back to current page?
  21. How to track a users progress through pages by inserting data into WordPress Database?
  22. Constructing a custom login form using ajax
  23. Use wp_remote_get to get JSON instagram feed from public profile
  24. PHP If user is logged in & on home page redirect
  25. WordPress shows registration link for non logged users
  26. Warning: Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’ (this will throw an Error in a future version of PHP)
  27. Admin username and password
  28. Get all user meta by meta key instead of ID
  29. Recovering WP Login Credintials in Code?
  30. WordPress custom login form using Ajax
  31. User’s total comment count excluding comments on their own posts
  32. How to: PHP Log Out Link?
  33. Login/logout in header
  34. Why is my cookie not unsetting upon logout? [closed]
  35. Show all posts by author
  36. Add New User, extra fields which are required?
  37. Modify user profile data through scripting?
  38. getting logged in user info (wp-load.php) from parent directory
  39. Do not execute If User is login as Administrator or any Specific Role
  40. get post content of particular post by url
  41. Problem with login form
  42. Best practice for show data to one specific user?
  43. WordPress from url get external source title
  44. How to redirect users based on role and content of redirect_to?
  45. get_users meta_query: REGEXP not working for matching new lines
  46. “operation successful” message
  47. Is it possible to create new user from external form using REST API?
  48. Foreach loop inside an array_merge
  49. WordPress transient not working with WP Engine
  50. Show current user posts only
  51. Change page password every day (predictable password ;) )
  52. show something only when user comes from specific page at remote host?
  53. REST API works in browser and via AJAX but fails via cURL
  54. Show site content based on user role
  55. ‘pre_user_query’ interfering with user export
  56. If user is logged in not working
  57. Show login greeting above sub-menu links?
  58. How can I call a specific file (via php) by referencing the logged-in username?
  59. Display additional user fields
  60. Help with accessing wp-admin page and resolving error messages
  61. Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
  62. Sort new column in Users wp-admin
  63. Log out without confirmation request (nonce)
  64. How to count active users on a specific page
  65. Hide Approved status for certain users in users list
  66. Infinite loop when logging out using custom login form
  67. Menu not updating for logged in users after redirect
  68. Export WordPress User Meta to CSV/Excel
  69. how to use auth_redirect() redirect visitor to login page if they are not login when they click account and order page?
  70. Issues adding Recaptcha v3 to WordPress Registration
  71. Display specific page if user signed in
  72. Allow specific user to edit a specific page
  73. Change Login or Logout text based on status
  74. Help hooking into user_register
  75. Redirecting the lost password page request when using a custon login page
  76. How do I send a POST request with params with WordPress REST API
  77. Use WP user status (logged_in) to manage access to independent application
  78. (Who to follow) Twitter widget
  79. Editable Student file associated with basic User ID
  80. Matching multi user
  81. Adding a sidebar to wp-login.php
  82. Update only some custom user fields
  83. Trying to display user meta by “name” – not by “ID”
  84. main menu page redirects to user ID
  85. White screen after login attempt
  86. Adapting a php array to WordPress
  87. Get author meta of all writers
  88. Cross origin ajax request always returns 0 when calling get_current_user_id();
  89. Forbid certain users to access a specific page
  90. How to replace wp-admin login page to another location?
  91. One folder to be accessible by one user
  92. Check user last login date
  93. How do I do so that people can register on my wordpress site?
  94. How to create custom user role without plugin?
  95. wp_login_url always redirects me to wp-admin
  96. PHP Works only for logged in users: [closed]
  97. Custom Admin Menu Report for Specific User ID
  98. change div text and link for logged in users
  99. wp-login – unable to redirect user to a custom login url
  100. Trouble Sending Elementor Form Data via cURL in WordPress
Categories PHP Tags curl, login, php, users
Prevent update of custom user profile meta field on the front end after 1st entry
Woocommerce REST API allow normal users make an order

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