项目作者: bezkoder

项目描述 :
React Redux Login, Logout, Registration example using Hooks, JWT, Local Storage, React Router, Thunk Middleware, Axios, Bootstrap
高级语言: JavaScript
项目地址: git://github.com/bezkoder/react-redux-hooks-jwt-auth.git
创建时间: 2020-09-03T03:06:16Z
项目社区:https://github.com/bezkoder/react-redux-hooks-jwt-auth

开源协议:

下载


React Redux Login, Logout, Registration example using Hooks

For more detail, please visit:

React Redux Login, Logout, Registration example with Hooks

React Hooks: JWT Authentication & Authorization (without Redux) example

React Redux Login, Logout, Registration example (using React Components)

Fullstack (JWT Authentication & Authorization example):

React + Spring Boot

React + Node.js Express

This project was bootstrapped with Create React App.

Set port

.env

  1. PORT=8081

Note:

Open src/services/auth-header.js and modify return statement for appropriate back-end (found in the tutorial).

  1. export default function authHeader() {
  2. const user = JSON.parse(localStorage.getItem('user'));
  3. if (user && user.accessToken) {
  4. // return { Authorization: 'Bearer ' + user.accessToken }; // for Spring Boot back-end
  5. return { 'x-access-token': user.accessToken }; // for Node.js Express back-end
  6. } else {
  7. return {};
  8. }
  9. }

Project setup

In the project directory, you can run:

  1. npm install
  2. # or
  3. yarn install

or

Compiles and hot-reloads for development

  1. npm start
  2. # or
  3. yarn start

Open http://localhost:8081 to view it in the browser.

The page will reload if you make edits.

In-depth Introduction to JWT-JSON Web Token

React CRUD example using Hooks

React Pagination using Hooks example

React Hooks File Upload example

Fullstack with Node.js Express:

React.js + Node.js Express + MySQL

React.js + Node.js Express + PostgreSQL

React.js + Node.js Express + MongoDB

Fullstack with Spring Boot:

React.js + Spring Boot + MySQL

React.js + Spring Boot + PostgreSQL

React.js + Spring Boot + MongoDB

Fullstack with Django:

React.js Hooks + Django Rest Framework

Serverless:

React Hooks Firebase Realtime Database: CRUD App

React Hooks Firestore example: CRUD App

Integration (run back-end & front-end on same server/port)

Integrate React with Spring Boot

Integrate React with Node.js Express