NestJS Authentication: JWTs, Sessions, Logins, and More! | NestJS PassportJS Tutorial

NestJS Authentication: JWTs, Sessions, Logins, and More! | NestJS PassportJS Tutorial

In this video we'll discuss the fundamentals of adding authentication to your NestJS API. We'll talk about utilizing passport to use different types of aaNestJS Authentication: JWTs, Sessions, logins, and more! | NestJS PassportJS Tutorial. We'll discuss the fundamentals of adding authentication to your NestJS API. We'll talk about utilizing passport to use different types of authentication strategies. Specifically we will try the passport-local strategy as a basic login with username and password example. Next, we'll take a look at potentially using sessions to store user information and persist their login state. Finally we will also take a look at a state-less approach with JSON Web Tokens (JWTs). We'll create our own JWTs and I'll show you how you can use that to protect your API routes! uthe...

In this video we'll discuss the fundamentals of adding authentication to your NestJS API. We'll talk about utilizing passport to use different types of authentication strategies. Specifically we will try the passport-local strategy as a basic login with username and password example. Next, we'll take a look at potentially using sessions to store user information and persist their login state. Finally we will also take a look at a state-less approach with JSON Web Tokens (JWTs). We'll create our own JWTs and I'll show you how you can use that to protect your API routes!

  • 00:00 - Intro
  • 03:35 - Initial routes
  • 04:41 - UsersService
  • 07:50 - AuthService
  • 10:40 - Implementing passport-local strategy (username/password login)
  • 18:08 - AuthGuards
  • 23:25 - Summary of local login flow
  • 29:02 - Guard to check if user is authenticated
  • 31:41 - Setting up sessions
  • 40:37 - Summary of login with sessions flow
  • 44:25 - Setting up JWT strategy, signing and validating
  • 1:00:25 - Summary of JWT strategy flow
  • 1:04:22 - Conclusion
  • 1:05:20 - Outro

nestjs nest node nodejs security

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

How to Use NestJS, Node.js Framework to Build a Secure API

Learn how to use NestJS, a Node.js framework powered by TypeScript, to build a secure API. In this tutorial, you'll learn how to build a secure API using NestJS, a module-based architecture framework for Node.js powered by TypeScript.

AdonisJS vs NestJS | NodeJS API Frameworks

In this video we compare AdonisJS 5 head-to-head against NestJS (with ExpressJS and TypeORM behind the scenes) and see which one comes out on top! If you've been trying to decide which of these two Typescript-based frameworks to use, this is the content for you!

Best Custom Web & Mobile App Development Company

Top Web & Mobile Application Development Company in India & USA. We specialize in Golang, Ruby on Rails, Symfony, Laravel PHP, Python, Angular, Mobile Apps, Blockchain, & Chatbots

How to Hire Node.js Developers And How Much Does It Cost?

A Guide to Hire Node.js Developers who can help you create fast and efficient web applications. Also, know how much does it cost to hire Node.js Developers.

Hire NodeJs Developer

Looking to build dynamic, extensively featured, and full-fledged web applications? **[Hire NodeJs Developer](https://hourlydeveloper.io/hire-dedicated-node-js-developer/ "Hire NodeJs Developer")** to create a real-time, faster, and scalable...