This is a simple example application that implements JWT Authentication. It exposes three endpoints
api/login.php
api/register.php
api/protected.php
For detailed steps check out this tutorial.
First clone the repo:
$ git clone https://github.com/techiediaries/php-jwt-authentication-example.git
Next, navigate inside the project's folder and run the following command to start the server:
$ cd php-jwt-authentication-example
$ composer install
$ php -S 127.0.0.1:8000