Complete JWT Authentication Course with Node, Mongo, Express

Build a complete JWT Authentication REST API using Node.js, MongoDB & Express.js

4.05 (48 reviews)
Udemy
platform
English
language
Web Development
category
instructor
254
students
3 hours
content
Feb 2021
last update
$39.99
regular price

What you will learn

Build a complete JWT Authentication API

What Model-Route-Controller is and how it works

How Access Tokens & Refresh Tokens work

Create Environmental Variables

Validate Input on Server-Side

Setting Up MongoDB Atlas & Community Server

Setting Up Express API Server

Login & Registration Functionality

Email Confirmation & Password Reset Functionality

Email Change Functionality

Description

Learn key API and JWT concepts to get you up to speed with the benefits of setting up modern JSON Web Token authentication through a microservice. Covering:

  • What is API and how does it work?

  • What is JWT and how does it work?

  • Setting Up MongoDB Atlas & Community Server

  • Setting Up Express API Server

  • Model-Route-Controller Design Pattern Implementation

  • Access Token Verification Middleware

  • Refresh Token Functionality

  • Login & Registration Functionality

  • Email Confirmation & Password Reset Functionality

  • Email Change Functionality

Here is what you will get with this course:

1. Complete beginner to API & JWT concepts – You will learn what API and JWT is, how they work and how you can practically implement them into a fully functional microservice that can be integrated with any front-end and back-end.

2. Useful resources – You will get useful PDF resources and code templates as you move towards progressing through the lectures. The PDF files will be in form of quick explanation guides and the code templates will include the previous functional code and code snippets.

3. Real-world challenges – At the end of some section you will be given at least one mini challenge to extend the functionality of the API before moving onto the next section, just to push you a little further when it comes to self-teaching and learning new things.

4. Advanced concepts & security - You will build an API that is completely secure and takes into consideration security holes and insecure practices. This will help all beginners, intermediate and advanced programmers to build a secure back-end and front-end integration.

5. Ask me anything – I understand that you may have questions about any aspect of the course, therefore I am more than happy to answer any questions in Q&A section within a very timely manner!

Content

Welcome to the course!

Course Overview
Meet Your Instructor
What is API and How Does It Work?
What is JWT and How Does It Work?

Preparing the Back End

Installing Prerequisites for Mac
Installing Prerequisites for Windows
Setting Up MongoDB Atlas

Setting Up the Back End

Plan of Action
Setting Up MongoDB Community Server
Setting Up Basic Express API Server
Setting Up Environmental Variables
What is the MRC Pattern (Model-Route-Controller)?
Implementing User Model
Implementing User Controllers
Implementing User Routes
API Rate Limiter - Prevent API Spam
Running & Testing our API!

Implementing JWT Authentication & Authorization

Plan of Action
Access Token Verification Middleware
Registration Functionality
Refresh Token Functionality
What is Mailtrap & Nodemailer?
Email Confirmation Functionality
Login Functionality
Password Reset Functionality
Email Change Functionality
Running & Testing our completed API!

Screenshots

Complete JWT Authentication Course with Node, Mongo, Express - Screenshot_01Complete JWT Authentication Course with Node, Mongo, Express - Screenshot_02Complete JWT Authentication Course with Node, Mongo, Express - Screenshot_03Complete JWT Authentication Course with Node, Mongo, Express - Screenshot_04

Reviews

Sean
October 9, 2023
I did not expect such a thorough and applicable project with this course. The registration, password reset, email confirmation, login, and mailing portions of this course were unexpected but incredibly applicable to the project I am currently working on! Absolutely no complaints!
Vitali
June 11, 2022
Good course. The main idea of Authentication was described But 1) The style of coding could be better. Insted using a lot of IF/ELSE blocks, author could use something like IF (condition 1) return response.send(...); IF (condition2) return response.send(...); 2) Would be good to show how it works in real (With frontend part. It is no need to do a lesson about frontend part, but would be better to show how it works shortly). I can gues that there will not be an accessToken when we try to go by link from email client. 3) No explanation for MAC how to work with mongo
Garvit
March 26, 2022
Very basic content. What's really disappointing is the lack of due diligence by the content creator. This is not an abstract scientific study but basic programming where the instructions should be wetted out and there should not be holes in the instruction flow. The instructor jumps many paces for basic stuff which is ok for an experienced developer to figure out, but for someone who is using his instructions verbatim, the holes will likely leave him in limbo at many places. For example, while configuring the environment he dwells in details on windows installation but leaves Mac installation for hyperlinks to follow. A clear approach would have been to include those steps succinctly. Similarly, he jumps on testing API using postman without bothering to include steps on starting the express server. These are all careless oversights that can block a newbie following his steps for the want of small pieces of information.
Kenneth
February 16, 2022
This is an excellent course for beginners who want to implement JWT with Node JS application following a REST API architecture principle. This course talks about the best practices when it comes to the use of the refresh and access tokens. It also teaches how developers can create confirmation whenever there should be changes on our users' accounts. This course has the potential to become an excellent course for integrating JWT with a Node application. Also, I liked how Nick formats his response bodies using a descriptive JSON text. Here are my recommendations to improve the quality of this course: 1. Give us (at least a guide) thoughts about ways to store the tokens safely on the client-side. Should we use cookies, sessions, or local storage for safekeeping these tokens? Even though this is just a Node, Mongo, and Express application of JWT it will be an eye-opener if we know how to store these cookies on the client side safely. Just a brief explanation would do. 2. Give us a brief explanation of how we can process email confirmations to verify that users can proceed with the profile changes that they requested. The use of email confirmation without fully utilizing their purpose in this course made me sad because the knowledge that it could have taught us will be an invaluable asset to us students. 3. Give us an explanation of where access tokens should be used. Should we use access tokens whenever we change emails and passwords only? Should we use access tokens just for fetching a user's cart items from the database? Should we use access tokens for every user interaction between the client and server? At the same time, when do we create a new refresh token? Do we do it after logins or registrations only, or do we do it for every user's interaction? This course still has a lot of ways to improve, but overall, the learning was an excellent experience for me. Thanks, Nick! I will now be a part of your students who will continuously anticipate the courses you make!
Oleksandr
January 9, 2022
Good explanation of the JWT concepts. Plus additional info about the password reset and email changing processes was provided.
Nguyen
December 2, 2021
One of the best course I've ever taken on Udemy. Not slow and also not too fast. I've learnt alot. Thank you!
Jeannot
November 5, 2021
A very good course that covers all the promised content perfectly and with working, clean and well thought out code. For a beginner, some explanation of secure cookies would certainly be helpful. But whether you store the data in a session store or cookies is fair enough a pure frontend issue that is not covered. This is also correct, because there are many frontends, and many courses, which treat exactly those. However, the backend could (should) also transmit the cookies, and since that's just a few lines of additional code, it would conclude the issue even better. All in all: a very good and well thought-out course, which clearly stands out from most other courses on this topic in a very positive way. Thank you very much.
TP
October 19, 2021
Pretty good course, especially for anyone who has no experience with JWT's and wants a good comprehensive understanding. This course will walk you through setting up robust little authorization API with a few useful features.

Charts

Price

Complete JWT Authentication Course with Node, Mongo, Express - Price chart

Rating

Complete JWT Authentication Course with Node, Mongo, Express - Ratings chart

Enrollment distribution

Complete JWT Authentication Course with Node, Mongo, Express - Distribution chart
3842626
udemy ID
2/11/2021
course created date
2/23/2021
course indexed date
Bot
course submited by