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:
- Changing user_nicename
- automated tests as a user?
- Creating login session via CURL
- User management system similar to wordpress one?
- Change CSS based on is_user_logged_in
- Admin Panel 404 Error after login
- How to block specific user id in custom login form?
- Call WP Rest-Api to GET /users/me returned NOTHING in console
- is_user_logged_in() not working in homepage
- List users in a dropdown for login
- rest_cannot_create_user – Sorry, you are not allowed to create new users. CURL WORDPRESS REST API
- User registration followed by automatic login
- Adding “Remember Me” in custom login
- cURL 28 error after switch from to brew php 7.2 on localhost
- Display user’s total comment count outside The Loop
- Creating a post with the REST API, curl and oauth returning 401 error
- Change the footer text on the login page
- Can i check if user is doing any ajax request?
- How do I create a WP user outside of WordPress and auto login?
- How to place login logout link on menu that redirects users back to current page?
- How to track a users progress through pages by inserting data into WordPress Database?
- Constructing a custom login form using ajax
- Use wp_remote_get to get JSON instagram feed from public profile
- PHP If user is logged in & on home page redirect
- WordPress shows registration link for non logged users
- Warning: Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’ (this will throw an Error in a future version of PHP)
- Admin username and password
- Get all user meta by meta key instead of ID
- Recovering WP Login Credintials in Code?
- WordPress custom login form using Ajax
- User’s total comment count excluding comments on their own posts
- How to: PHP Log Out Link?
- Login/logout in header
- Why is my cookie not unsetting upon logout? [closed]
- Show all posts by author
- Add New User, extra fields which are required?
- Modify user profile data through scripting?
- getting logged in user info (wp-load.php) from parent directory
- Do not execute If User is login as Administrator or any Specific Role
- get post content of particular post by url
- Problem with login form
- Best practice for show data to one specific user?
- WordPress from url get external source title
- How to redirect users based on role and content of redirect_to?
- get_users meta_query: REGEXP not working for matching new lines
- “operation successful” message
- Is it possible to create new user from external form using REST API?
- Foreach loop inside an array_merge
- WordPress transient not working with WP Engine
- Show current user posts only
- Change page password every day (predictable password ;) )
- show something only when user comes from specific page at remote host?
- REST API works in browser and via AJAX but fails via cURL
- Show site content based on user role
- ‘pre_user_query’ interfering with user export
- If user is logged in not working
- Show login greeting above sub-menu links?
- How can I call a specific file (via php) by referencing the logged-in username?
- Display additional user fields
- Help with accessing wp-admin page and resolving error messages
- Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
- Sort new column in Users wp-admin
- Log out without confirmation request (nonce)
- How to count active users on a specific page
- Hide Approved status for certain users in users list
- Infinite loop when logging out using custom login form
- Menu not updating for logged in users after redirect
- Export WordPress User Meta to CSV/Excel
- how to use auth_redirect() redirect visitor to login page if they are not login when they click account and order page?
- Issues adding Recaptcha v3 to WordPress Registration
- Display specific page if user signed in
- Allow specific user to edit a specific page
- Change Login or Logout text based on status
- Help hooking into user_register
- Redirecting the lost password page request when using a custon login page
- How do I send a POST request with params with WordPress REST API
- Use WP user status (logged_in) to manage access to independent application
- (Who to follow) Twitter widget
- Editable Student file associated with basic User ID
- Matching multi user
- Adding a sidebar to wp-login.php
- Update only some custom user fields
- Trying to display user meta by “name” – not by “ID”
- main menu page redirects to user ID
- White screen after login attempt
- Adapting a php array to WordPress
- Get author meta of all writers
- Cross origin ajax request always returns 0 when calling get_current_user_id();
- Forbid certain users to access a specific page
- How to replace wp-admin login page to another location?
- One folder to be accessible by one user
- Check user last login date
- How do I do so that people can register on my wordpress site?
- How to create custom user role without plugin?
- wp_login_url always redirects me to wp-admin
- PHP Works only for logged in users: [closed]
- Custom Admin Menu Report for Specific User ID
- change div text and link for logged in users
- wp-login – unable to redirect user to a custom login url
- Trouble Sending Elementor Form Data via cURL in WordPress