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
- change Dashboard default page on login
- add_cap not working
- Do not execute If User is login as Administrator or any Specific Role
- get post content of particular post by url
- wordpress archive a user
- Problem with login form
- Best practice for show data to one specific user?
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Call to undefined function get_userdata() in plugin
- WordPress from url get external source title
- Log in / Log Out Custom Button
- Should `wp_login` be used since it’s deprecated?
- How to redirect users based on role and content of redirect_to?
- get_users meta_query: REGEXP not working for matching new lines
- How to display login form anywhere, when user isn’t logged in, without redirecting?
- How to show a users bio on a page
- How can I open up my administrative panel to everyone?
- “operation successful” message
- php if username is role
- How do you create two separate Register pages?
- Is it possible to create new user from external form using REST API?
- Foreach loop inside an array_merge
- How can I add a new row in a separate database when someone registers via WordPress?
- WordPress transient not working with WP Engine
- Show current user posts only
- How to send a HTTP Post request using PHP Curl and WordPress
- One account with multiple logins
- Change page password every day (predictable password ;) )
- Lost in trying to create user database system
- SOAP Request/Parsing XML From wp_send_json_success
- show something only when user comes from specific page at remote host?
- Get the users that my following users are following
- REST API works in browser and via AJAX but fails via cURL
- create front-end users post list by specific category
- Shortcode to log user into current URL
- cURL error 6 on news area, and also won’t auto update
- Show site content based on user role
- PHP getting error when trying to access WP-Admin Dashboard
- ‘pre_user_query’ interfering with user export
- I installed WordPress locally now how do I login?
- Post to WordPress from another Server via PHP
- If user is logged in not working
- Change homepage content if user is logged in – BuddyPress
- php return username of currently viewed author profile
- Accessing an API with jQuery and AJAX
- Show login greeting above sub-menu links?
- How to list users like an archive page 10 users on page and have navigations
- calling admin-ajax.php from admin-ajax.php
- How can I call a specific file (via php) by referencing the logged-in username?
- Redirect to current user page upon link click
- is_user_logged_in returning nothing on custom page
- Use of antispambot with $curauth->email
- Uses for function: wp_update_user
- Display additional user fields
- Help with accessing wp-admin page and resolving error messages
- Generate a QR code when creating a new WordPress user
- Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
- Change wordpress’ database data using ajax – how to get current user id?
- Sort new column in Users wp-admin
- Sort column in Users admin Tab
- Can’t log in to WordPress wp-admin after adding code to functions.php
- Allow a user or role to view drafts and previews, but not other admin privileges?
- Woocommerce display orders with products from specific categories to specific admins
- Storing huge number of users in wordpress
- Check if user had autologin & if so, logout
- PHP warning – Use of undefined constant ‘FORCE_SSL_LOGIN’ ‘FORCE_SSL_ADMIN’ on wp-config.php
- Get current user id in function php
- Log out without confirmation request (nonce)
- How to count active users on a specific page
- how can I call a function when time expire
- Hide Approved status for certain users in users list
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Uploading/integrating custom user registration page
- If user has clicked link add class and store using PHP/WordPress
- Restrict wordpress access to logged users only
- Infinite loop when logging out using custom login form
- Menu not updating for logged in users after redirect
- Store data from JavaScript object to custom table in user account
- 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
- Page template not working when logged out
- Display specific page if user signed in
- Allow specific user to edit a specific page
- How to change the value of a variable using input field?
- Display current user metadata on WordPress page
- Change Login or Logout text based on status
- How do I track which user clicked my button?
- Refresh page after login with litespeed cache