Загрузка страницы

GraphQL Authentication: JWT, login, signup, and more! | NestJS PassportJS Tutorial

In this video we'll discuss the fundamentals of adding authentication to your GraphQL NestJS API. We'll talk about utilizing passport to use different types of authentication strategies. Specifically we will use the passport-local strategy to login with username and password. We'll also take a look at how to generate JWT to keep users logged in. Next, we'll protect our GraphQL queries by checking for access tokens in the headers, as well as verifying it. Finally we will explore how to properly do user sign-up / registration, specifically making sure that we are saving passwords safely. There are a lot of gotchas with using PassportJS with GraphQL, we'll talk about those at well.

00:00 - Intro
00:25 - Create new Nest application
00:55 - GraphQL setup
09:26 - Passport and Auth Module setup
12:43 - Local Strategy
17:03 - Login Mutation
21:15 - Auth Guard
25:34 - Summary of login flow
30:31 - Setting up JWT
35:40 - JWT Strategy
37:44 - JWT Auth Guard
39:24 - Setting Authorization header
39:54 - Summary of JWT flow
42:53 - Signup flow
46:06 - Bcrypt for password hashing
51:30 - Full summary of everything
52:50 - Outro

Видео GraphQL Authentication: JWT, login, signup, and more! | NestJS PassportJS Tutorial канала Marius Espejo
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
5 декабря 2021 г. 13:41:53
00:53:19
Яндекс.Метрика