In this course, we will learn how to secure a NestJS application using bcrypt and session-based authentication. Additionally, we will implement comprehensive testing, including unit tests with mocks and component tests without mocks, while using the MVC pattern throughout.
Overview
Syllabus
- Unit 1: User Authentication with Bcrypt Password
- Run User Registration with Hashed Passwords
- Improving User Login Feedback
- Fix User Password Storage
- Enhance Registration Security with Password Validation
- Implement Secure User Registration
- Unit 2: Session Management with Express in NestJS
- Tracking Visits with Session in NestJS
- Session Management Timeout
- Running a Basic Session-Based Authentication Setup
- Resetting Session Data
- Unit 3: Session-Based Authentication with Passport.js in NestJS
- Session-Based Authentication using PassportJS
- Adding Logout Functionality
- Ensure Unique Usernames in Registration
- Fix Session Persistence Issue
- Create an Admin Authentication Guard
- Unit 4: Unit Testing with Mocks
- Run Unit Tests for AppController
- Adding Tests for New Method
- Run Unit Tests with Mocks
- Update User Details with Tests
- Implement and Test a New UserService Method