Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ModeSix
Mar 14, 2009

Apologies in advance for my scattered idea here.

I am trying to run a React app on top of Wordpress but I want to use built in Wordpress authentication rather than an Auth form in my app.

My users need to access the dashboard as normal, but view/edit content through the React frontend.

Is there a way to get the cookie information generated by the Wordpress login to pass through for authentication in my React app for the POST api method?

Basically, auth will happen using the standard Wordpress login form, but I need the auth data generated available to my React app so it can modify posts without having a login flow on the React side of things.

I can't find anything useful when searching as everything I've found is about building a login form and posting to the API for auth.

Adbot
ADBOT LOVES YOU

ModeSix
Mar 14, 2009

Secondary thought on this, since I am running the React app inline within Wordpress... I guess I can just create a php form to handle posting which should be authenticated as long as I run it inside a page-template of sorts?

Or... will the React app already have authority to POST to the API since it's running inline in a Wordpress page?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply