Skip to content

MERN JWT Auth

Latest
Compare
Choose a tag to compare
@vishalnagda1 vishalnagda1 released this 20 May 09:41
· 49 commits to master since this release

MERN JWT Auth Backend

GitHub license Repository version

MERN JWT Auth is a fully MERN application. In this version we have implement the frontend of the application using React.

Release Notes:

  • Set up the frontend using create-react-app
  • Created static components for the Navbar, Landing, Login and Register pages
  • Setup Redux for global state management
  • Link Redux to with the components
  • Display errors from our backend in theReact forms
  • Create protected routes (pages only certain users can access based on their authentication)
  • Keep a user logged when they refresh or leave the page (in other words, until they either logout or the jwt expires)
Installed Packages:
  1. Install axios because it is promise based HTTP client for making requests to our backend.
  2. Install classnames package as it is used for conditional classes in our JSX.
  3. Install jwt-decode package as it is used to decode our JWT so we can get user data from it.
  4. Install react-redux package as it allows us to use Redux with React.
  5. Install react-router-dom package and it is used for routing purposes.
  6. Install redux package as it is used to manage state between components.
  7. Install redux-thunk package because it is a middleware for Redux that allows us to directly access the dispatch method to make asynchronous calls from our actions.