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:23 Register user route
03:40 Register validation
12:40 Hash password with bcrypt
18:30 Save user to database
23:17 Login user explanation
25:34 Login user route
26:38 Login validation
28:17 Verify password with bcrypt
29:48 Sign JWT token
36:15 Test user login route

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 #web-development

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