In this tutorial series, I’m setting up a project template for working with user authentication in the MERN stack. You will learn to register user accounts to a MongoDB database, log in users on the react frontend and verify logged in users. We’ll be using react hooks and the context API to deal with the state management of the user authentication in the frontend.

TABLE OF CONTENTS

  • 00:00 Example project
  • 02:26 Backend project setup
  • 05:29 Express setup
  • 10:25 MongoDB database setup
  • 18:00 Mongoose setup
  • 20:10 User model
  • 24:25 User router
  • 27:06 User route test

Insomnia API tester: https://insomnia.rest/
Github frontend: https://github.com/jgbijlsma/mern-auth-template-front
Github backend: https://github.com/jgbijlsma/mern-auth-template-back

#mongodb #express #reactjs #node-js #javascript

MERN Stack User Authentication: User accounts with JWT, bcrypt, react hooks, context API
42.10 GEEK