Essential CSS
JavaScript Roadmap
Learn JavaScript
Mastering Web Typography
Practical Astro
Understanding Async JS
Unorthodox Tailwind
API Masterclass
Build and Deploy
The Beginner Freelancer
Real World Node
Profile Billing Logout
Real World Node
Lesson Plan
  1. Workshop Recordings
    1. ๐Ÿ“น Understanding Node and Express
    2. ๐Ÿ“น Creating a traditional server
    3. ๐Ÿ“น Building API servers
    4. ๐Ÿ“น Create, Read, Update, and Delete APIs with real databases
    5. ๐Ÿ“น Handling user flows
    6. ๐Ÿ“น Testing your app and database with Vitest
    7. ๐Ÿ“น Testing Middlewares and APIs โ€” including Mocking
    8. ๐Ÿ“น Changing and resetting passwords

๐Ÿ“น Handling user flows

0m:53s
18m:49s

In this workshop we covered:

  • How to hash and verify a userโ€™s password.
  • How to let a user login with their email and password (basic login)
  • How to let users login with tokens
  • How to create a middleware to authenticate users

Timestamps

  • 0:00 Recap of previous session
  • 1:30 Adding passwords to users
  • 5:30 Hiding passwords in the response to the frontend
  • 6:30 Leaving notes for testing a user service
  • 8:50 My preferred way to handle Mongoose validation errors
  • 12:30 Hashing the password
  • 19:00 Allowing a user to login
  • 23:00 Login functionality with middlewares
  • 28:50 Using the Authorization Header for Basic Authentication
  • 41:48: Supporting Bearer authentication
  • 44:51 Creating an access token
  • 53:26 Decoding the access token
  • 58:35 Quick recap about the authentication middleware
  • 59:41 Protecting the JWS secret with dotenv
  • 1:05:23 Questions and Answers

Reference Async JS Course which is well โ€” I can link directly here.

Create the entire authentication middleware from scratch.