• StevieDC

    (@steviedc)


    I have a website in development. It has its own authentication system. I would like to have WordPress also installed so as to use BuddyPress.
    I have written some code that allows me to login to WordPress with the WP API. This uses Curl to call the WP login when a user logs in to my website.
    I am able to call the WP Login with the browser URL but using Curl does not work. It appears that the WP cookies are not being saved if I call using Curl.
    The WordPress installation is in a sub-folder and so I have tried many many combinations of COOKIE_PATH etc. in wp-config.php.
    Does anyone have any suggestions please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dion

    (@diondesigns)

    WordPress sends the login cookies in the response header. So you’ll need to parse the response header from your curl request to obtain the cookies, and then send the cookies to the user in your response header.

    If you need assistance with parsing the response header, head over to StackExchange.

    Thread Starter StevieDC

    (@steviedc)

    Brilliant. Thanks Dion.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress API – External login with Curl – Cookies not saving’ is closed to new replies.