У нас вы можете посмотреть бесплатно GraphQL Authentication: JWT, login, signup, and more! | NestJS PassportJS Tutorial или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
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