Skip to content

This is a comprehensive Laravel 8 and React JWT Authentication example.

Notifications You must be signed in to change notification settings

hovhannisyan-code/laravel-react-with-jwt-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Laravel(8.6.0) and React(17.0.2) with JWT Authentication

User Login & Signup API

Prerequisite

  1. Make sure you have composer installed.
  2. Make sure you have latest stable version of node installed.

Setup and Installation

  • git clone

Laravel

  • create a .env file copy content from .env.example and update the values
  • Update DB_HOST, DB_DATABASE, DB_USERNAME and DB_PASSWORD in .env file to yours.
  • composer install && composer update
  • php artisan migrate:refresh
  • php artisan key:generate
  • php artisan jwt:secret
  • php artisan serve

React

  • create a .env file copy content from .env.example and update the values
  • Update REACT_APP_API_URL and REACT_APP_JWT_SECRET(copy from laravel .env file)
  • npm install
  • npm start