Adding access tokens to secure our API

The APIs that we created in the last two recipes is public. That means everyone can access and get the information from our server, but what happens if you want to add a security layer on the API and get the information for registered users on your platform? We need to add access token validation to protect our API, and to do this; we have to use JSON Web Tokens (JWT).

Get React Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.