In this tutorial, we'll learn how to use React to build login,
signup and logout system and Axios to send API calls and handle
JWT tokens.
For building the PHP application that implements the
JWT-protected REST API, check out PHP JWT Authentication
Tutorial.
We'll be using the same application built in the previous
tutorial as the backend for our React application we'll be
building in this tutorial.
Prerequisites
You will need to have the following prerequisites to follow this
tutorial step by step:
Knowledge of JavaScript, Knowledge of React, Knowledge of PHP,
PHP, Composer and MySQL installed on your development machine,
Node.js and NPM installed on your system.
That's it. Let's get started!
Cloning the PHP JWT App
Our example application implements JWT Authentication. It exposes
three endpoints
api/login.php api/register.php api/protected.php
How to …
[Read more]