Skip to content

Releases: vishalnagda1/mern-jwt-auth

MERN JWT Auth

20 May 09:41
Compare
Choose a tag to compare

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.

MERN JWT Auth Backend

05 May 05:59
Compare
Choose a tag to compare
MERN JWT Auth Backend Pre-release
Pre-release

MERN JWT Auth Backend

GitHub license Repository version

Release Notes:

  • Update the git repo name from mern-auth to mern-jwt-auth

Future Implementations:

  1. Implementation of React client app.
  2. Integration of redux for state management.
  3. Integration of Backend APIs in the react client.

MERN JWT Auth Backend

02 May 11:42
Compare
Choose a tag to compare
MERN JWT Auth Backend Pre-release
Pre-release

MERN JWT Auth Backend

GitHub license Repository version

Release Notes:

  • Initialized the application using npm and installed necessary packages
  • Set up a MongoDB database
  • Set up a server with Node.js and Express
  • Created a database schema to define a User for registration and login purposes
  • Implement the user registration API.
  • Implement the user login API.
  • Set up three API routes, register, login, and currentuser using passport + jsonwebtokens for authentication and validator for input validation
Installed Packages:
  1. Install bcryptjs package to hash passwords before we store them in our database.
  2. Install body-parser to parse incoming request bodies in a middleware.
  3. Install concurrently to allows us to run our backend and frontend concurrently and on different ports.
  4. Install express so on top of Node it make the routing, request handling, and responding easier to write.
  5. Install is-empty as global function that will come in handy when we use validator.
  6. Install jsonwebtoken for authorization.
  7. Install mongoose to interact with MongoDB.
  8. Install passport to authenticate requests, which it does through an extensible set of plugins known as strategies.
  9. Install passport-jwt so passport strategy for authenticating with a JSON Web Token (JWT); lets you authenticate endpoints using a JWT.
  10. Install validator to validate inputs (e.g. check for valid email format, confirming passwords match).
  11. Install nodemon as dev dependency to track changes and restart the server.

Future Implementations:

  1. Implementation of React client app.
  2. Integration of redux for state management.
  3. Integration of Backend APIs in the react client.