From the course: Building a Headless WordPress App with REST API

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Install and configure the OAuth2 plugin

Install and configure the OAuth2 plugin

From the course: Building a Headless WordPress App with REST API

Start my 1-month free trial

Install and configure the OAuth2 plugin

- [Narrator] At this juncture, we need to switch gears for a bit step back from the code and go back into some WordPress configuration. As we built out the task post type, the task logger role and the custom meta box with its custom fields. I kept checking in with the REST API to make sure we got the output we wanted, and we do. But here's the thing. I never authenticated these requests, when I sent them through Postman, there was no login. I didn't tell Postman, who I was. And WordPress is just returning the data to me, because right now, all it takes to get to the task is to simply send a get request through the REST API, which is not great. So in this chapter, we'll add that all-important authentication layer to the REST API to ensure, only those for the right authorization can access the tasks. There are several ways of authenticating users through the WordPress REST API. And in the course WordPress REST API,…

Contents