From the course: WordPress: REST API

Unlock the full course today

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

Cookie authentication

Cookie authentication - WordPress Tutorial

From the course: WordPress: REST API

Start my 1-month free trial

Cookie authentication

- [Speaker] The method WordPress core uses to authenticate users is called cookie authentication. The purpose of cookie authentication is not only to authenticate the original login, but also confirm the authenticity of the visitor any time the visitor tries to do something. We can use cookie authentication with the REST API as long as the user is working within the context of WordPress, meaning they are logged in to WordPress through regular means in the current browser. When using cookie authentication with a REST API, we're really piggybacking off the existing cookie authentication managed by WordPress itself. And that means, if you're building a standalone application that works independently of WordPress admin, cookie authentication is not the option you're looking for and you should jump ahead in this chapter to where we cover JWT authentication instead. If, on the other hand, you're working with a theme or a plugin or…

Contents