- JWT Authentication Flow for User Signup & User Login
- Project Structure for React JWT Authentication (without Redux) with SessionStorage, React Router & Axios
- Creating React Components
- Dynamic Navigation Bar in React App
We will build a React application in that there is Login/Logout, Register, Home, and Dashboard pages and React js Login Authentication Routes
- Laravel 9
- Mysql
- React js 17.0.2
- bootstrap 5
- react-router-domv6
- axios
- Formik
- Yup
- dotenv
- react-data-table-component
- styled-components
- react-modal
- react-toastify
-
First clone project in your pc: Run
git clone https://github.com/itjewel/react-laravel-authentication-projectmanagment.git
-
PHP Version needed above 8.0
-
cd into the "Laravel" folder: Run
cd Laravel
-
Copy .env.example file and rename as .env; Alternatively, run
cp .env.example .env
-
Edit database credentials in your newly generated/created .env file
-
Run
composer install
to install all libraries and dependencies in the composer.lock file -
Run
php artisan key:generate
to set the APP_KEY value in the .env file -
Run
php artisan jwt:secret
-
Run
composer require tomfordrumm/jwt-auth:dev-develop
-
Having created a database, and specifying the same with the right credentials in your .env file, run
php artisan migrate
to create the tables -
Run
php artisan serve
to run the PHP development server. Alternatively, you can run your project with XAMPP or WAMP.
-
cd into the "reactjs" folder: Run
cd reactjs
-
Run
npm install
to download all packages and dependencies needed for our client -
While making sure that the API (Laravel) Server is up and running, run
npn start
to start your react application -
Congratulations!!!