Giter Club home page Giter Club logo

jwt-react-node-mysql's Introduction

JWT-react-node-mySQL

Example using react, nodeJS, mySQL with JWT(Json web token) to create login and register system

What is a JWT?

JSON Web Token is an open industry standard used to share information between two entities, usually a client (like your app’s frontend) and a server (your app’s backend).

They contain JSON objects which have the information that needs to be shared. Each JWT is also signed using cryptography (hashing) to ensure that the JSON contents (also known as JWT claims) cannot be altered by the client or a malicious party.

For example, when you sign in with Google, Google issues a JWT which contains the following claims / JSON payload:

JWT.IO allows you to decode, verify and generate JWT.

Prerequisites

  1. Install XAMPP web server
  2. Any Editor (Preferably VS Code or Sublime Text)
  3. Any web browser with latest version

Languages and Technologies used

  1. HTML5/CSS3
  2. ReactJS
  3. Material-UI
  4. XAMPP
  5. Nodejs express nodemon
  6. MySQL

Steps to run the project in your machine

  1. import sql script into mysql ( mydb.sql )

    user table

    Field Type Null Key Default Extra Comment
    id int(11) NO PRI NULL auto_increment primary key
    email varchar(50) NO UNI NULL user's email
    password text NO NULL user's password
    fname varchar(50) NO NULL first name
    lname varchar(50) NO NULL last name
  2. Server Installation

    cd server 
    npm install
    nodemon app.js
    
    Open http://localhost:3333 to view it in the browser.
  3. Client Installation

    cd client
    npm install
    npm run dev
    
    Open http://localhost:5173/ to view it in the browser.

Website reference

  • JWT-nodejs : identify an authenticated user
  • Express API with JWT
  • Bcrypt : A library to help you hash passwords.
  • Ajax : send and receive (HTTPS request)information in various formats
  • Cors : access the api from different domain

jwt-react-node-mysql's People

Contributors

ong22280 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.