- 23
- 460 700
Code with Vlad
United Kingdom
เข้าร่วมเมื่อ 27 มี.ค. 2020
I create content about Full Stack web development featuring NestJs, React and Prisma.
My website: www.codewithvlad.com
My Blog: www.codewithvlad.com/blog
Connect on social media:
vladimir_agaev
#nestJs #typescript #javascript
My website: www.codewithvlad.com
My Blog: www.codewithvlad.com/blog
Connect on social media:
vladimir_agaev
#nestJs #typescript #javascript
NestJs RBAC - Role Based Authorization Tutorial
This NestJs RBAC tutorial will cover everything you need to know about role-based authorization and access control. You'll learn the difference between RBAC and ABAC, how to implement NestJs access control using roles and permissions, and a real-life NestJs RBAC example in action.
We'll also explore attribute-based access control and RBAC access control, so you can choose the best approach for your application.
Whether you're a seasoned NestJs developer or just getting started, this tutorial is the ultimate guide to NestJs RBAC.
NestJs Essentials Course: courses.codewithvlad.com/p/nestjs-essentials
Project Repository: github.com/vladwulf/cwv-nestjs-rbac-tutorial
Chapters
00:00 RBAC Introduction
00:55 What is RBAC is why it's useful
01:35 RBAC vs ABAC vs IBAC
02:45 Project Overview
24:00 Outro
We'll also explore attribute-based access control and RBAC access control, so you can choose the best approach for your application.
Whether you're a seasoned NestJs developer or just getting started, this tutorial is the ultimate guide to NestJs RBAC.
NestJs Essentials Course: courses.codewithvlad.com/p/nestjs-essentials
Project Repository: github.com/vladwulf/cwv-nestjs-rbac-tutorial
Chapters
00:00 RBAC Introduction
00:55 What is RBAC is why it's useful
01:35 RBAC vs ABAC vs IBAC
02:45 Project Overview
24:00 Outro
มุมมอง: 25 006
วีดีโอ
Basic Authentication vs Session Authentication vs JWT Authentication
มุมมอง 5Kปีที่แล้ว
In this video, we will be discussing the three most common types of authentication used in web applications: Basic Authentication, Session Authentication, and JWT (JSON Web Token) Authentication. We will start by exploring what each of these methods is and how they work. Then, we will compare the advantages and disadvantages of each method to help you decide which one is the best fit for your a...
Apollo Codegen In React - Generate Typescript Types from GraphQL Schema and Queries
มุมมอง 11K2 ปีที่แล้ว
Graphql codegen / Apollo codegen is a great feature! When working with GraphQL and Typescript in React, we want to be able to have typescript autocompletion on the variables we pass to our queries and mutations as well as on the data that is being returned from them. You can do it manually by inserting a type or an interface as a generic inside your useQuery() or useMutation() hook. However, th...
Zustand React Typescript Tutorial (vs Easy Peasy)
มุมมอง 10K2 ปีที่แล้ว
Zustand is an amazing state management library for React, it has grown in popularity and is very easy to use. In this video, I will be comparing it with another popular state management library called easy peasy. Github link: github.com/vladwulf/zustand-vs-easypeasy Chapters 00:00 Introduction 01:35 Redux, Mobx and other react state management libraries 08:00 Zustand vs Easy Peasy code 18:20 Zu...
NestJs Testing Tutorial - Integration Testing
มุมมอง 23K2 ปีที่แล้ว
In this video, I will be showing how to do integration testing in nestjs without mocking dependencies. If you love this video consider leaving me a like to help with the youtube algorithm and subscribing if you haven't. 00:00 Integration Testing Introduction 06:20 Project structure 09:45 Test setup 10:00 Setting up Jest 18:00 Setting up testing environment 20:30 Push prisma migrations 21:30 cre...
NestJs JWT - Access Tokens & Refresh Tokens - Ultimate Guide
มุมมอง 169K2 ปีที่แล้ว
In this video, I will be building a complete authentication module with logout and refresh functionality. I will also show how you can use access tokens and refresh tokens with passport js and nestJs. If you love this video consider leaving me a like to help with the youtube algorithm and subscribing if you haven't. Github repo of the project: github.com/vladwulf/nestjs-jwts 00:00 NestJs Jwt Au...
Javascript ES6 Modules Tutorial
มุมมอง 1.3K3 ปีที่แล้ว
Learn how to add Babel with the latest javascript features to your express application. In this video, we cover the subject of es6 modules vs common js modules. TABLE OF CONTENT 01:20 Common Js Modules 04:00 ES6 Modules Github source code: github.com/vladwulf/es-modules-tutorial
Express JS Fundamentals Crash Course
มุมมอง 1.1K3 ปีที่แล้ว
In this crash course, we are going to learn Express js fundamentals by creating a REST CRUD API. TABLE OF CONTENT: 00:00 What is Express Js 01:10 Creating a Project 02:25 Section 1: Express JS Hello World 07:40 Section 2: Express JS CRUD API
Axios js tutorial in 120 seconds
มุมมอง 43K3 ปีที่แล้ว
In this video, I briefly explain what is Axios js and how it compares with the fetch API. We cover: - Axios HTTP requests - Axios Interceptor - Axios vs fetch - Axios error handling Axios js documentation: axios-http.com/ If you liked this video leave a like!
NestJs Authentication With JWT Tokens
มุมมอง 30K3 ปีที่แล้ว
In this tutorial, we are going to learn how to use Jwt Authentication tokens in NestJs. We are going to create an authentication module, use the nestjs module to sign jwt tokens, and use passport.js to authentify the jwt bearer token. Github Repo: github.com/vladwulf/nestjs-authentication-tutorial 00:00 Introduction 00:40 NestJs Starter Project 04:20 Authentication Module 07:40 JSON user databa...
NestJs Validation Tutorial 2021
มุมมอง 12K3 ปีที่แล้ว
Request data validation is quite an important concept to write clean code. In this video, you will learn how to use Pipe and Data Transfer Object (DTO) validations in NestJs. Here is the Github repo with the code: github.com/vladwulf/nestjs-validation-tutorial Follow me on Twitter to stay updated with the release of further tutorials vladimir_agaev
NestJs Logging Tutorial 2021
มุมมอง 28K3 ปีที่แล้ว
Logging is a very important aspect of any serious development experience. It is critical during the development phase as it helps to identify bugs. But logging is also important during the production phase, especially when it comes to cron jobs and other asynchronous tasks. This is because you need to have an eye on what is happening on your server. If a cron job is not working properly you sho...
AWS Tutorial - How To Host A Static Website With Namecheap, Route 53, Cloudfront, S3 and SSL
มุมมอง 25K4 ปีที่แล้ว
AWS Tutorial - How To Host A Static Website With Namecheap, Route 53, Cloudfront, S3 and SSL In this video we learn how to buy your domain, deploy your static website on aws using s3, cloudfront, route53 and the certificate manager. Basically everything you need to know to deploy your website in a proper way.
React Redux Easy Peasy Complete Course - ADVANCED THUNKS (Part 4)
มุมมอง 1.4K4 ปีที่แล้ว
React Redux Easy Peasy Complete Course - ADVANCED THUNKS (Part 4)
React Redux Easy Peasy Complete Course - THUNKS (Part 3)
มุมมอง 1.4K4 ปีที่แล้ว
React Redux Easy Peasy Complete Course - THUNKS (Part 3)
React Redux Easy Peasy Complete Course - Actions (Part 2)
มุมมอง 1.6K4 ปีที่แล้ว
React Redux Easy Peasy Complete Course - Actions (Part 2)
How to organise React Functional Components
มุมมอง 9204 ปีที่แล้ว
How to organise React Functional Components
React Redux Easy Peasy Complete Course - First Steps (Part 1)
มุมมอง 5K4 ปีที่แล้ว
React Redux Easy Peasy Complete Course - First Steps (Part 1)
👨💻💻 Node js 14 release explained | Node Js tutorial
มุมมอง 1.6K4 ปีที่แล้ว
👨💻💻 Node js 14 release explained | Node Js tutorial
Learn JSON in 4 minutes - JSON tutorial for beginners
มุมมอง 6K4 ปีที่แล้ว
Learn JSON in 4 minutes - JSON tutorial for beginners
😲 Understand Javascript for Complete Beginners in 20 minutes - 2020
มุมมอง 2.8K4 ปีที่แล้ว
😲 Understand Javascript for Complete Beginners in 20 minutes - 2020
React 🔥 Hot 🔥 Reloading with Create React App - EASY
มุมมอง 17K4 ปีที่แล้ว
React 🔥 Hot 🔥 Reloading with Create React App - EASY
What is your theme vs code?
Nice tutorial. I'm new to Nestjs. there arre somethings im wondering. the strategy receive the token from request and verify it. if token valid return the payload wich was signed. so is it neccessary to check if the user existed in the auth service
Great! I like your contnet please make an advanced course ! (comming from freecodecamp course)
Very clear! Thank you!
50018 Kerluke Cove
Kling Mountains
Considine Road
Thank you, it was an incredible tutorial
Very good tutorial!
Wow, that's great.
I have .env and .env.test each with a DATABASE_URL. I then give the database to Prisma using env(DATABASE_URL). The Databases are running but not using Docker. When I run "prisma migrate dev" will the migrations between the two databases get mixed up or will Prisma know which database it did changes to? I'm worried that I could wipe my development database somehow and lose all the data.
Just a note for anyone following along: the refresh service method doesn't work as intended. When you send a refresh token to /refresh you get new access and refresh tokens. However, if you continue to send the same refresh token to /refresh it will accept it even though the refresh token has obviously changed. The reason is because bcrypt only accepts strings up to 72 characters, and when changing refresh tokens those first 72 characters will remain the same and so the compare function will always return true.
Hi vlad, how you handle or invalidated access token after logout? I have try overwrite the access token and refresh token to be expiring after a few second but it seems like does not have effect on it.
Is there any reason why you don't use passport local?
Massive thanks for this wonderful video. You saved me days! Vlad, I wish you to thrive in your career :)
Vlad aka darslariz juda zo'r (from Uzbekistan)
27:30
Coming across these new libararies and tech seems overwhelming and u sir took that uneasiness away. Thankful!
Vlad we need you back! Best nestjs youtuber out there
First I used Fetch API for fetching data from JSON to HTML however the things gets complicated I used Axios as my main API for fetch data from client and MariaDB together with Express. Express and Axios is the best combo to deal with data fetching and saves more time.
I would love to see you look at Remult
You came here and wondering is it worth watching this video? Absolutely! Thanks, Vlad!
1:00:00
Низкий тебе поклон, чувак. Спасибо!) Твоё видео это та самая жемчужина на просторах интернета
I started writing out the XMLHttpRequest. No libraries needed. It's just as easy, IMHO.
But in this scenario, when an access token expires and we call the refresh endpoint, we're updating both tokens. Given this situation, the refresh token expiration wouldn't make sense, right?
200 - u said TWO OW OW ? timecode - 1:10:15
Nice video but the refresh strategy you have used in the video seems wrong. anyone who stole the refresh token can always brought new access token & refresh token. you can try sending multiple requests to the /refresh route it always brings the data. but in reality, it should work once.
not working for me, database connection issue, cant listen error from db, pls help
Thank you Vlad!
me recognizing the errors before vlad does proves i m getting better😂 thanks for the explanation tho i needed this
Thanks for the great tutorial. I got a question, what is the point of sending and generating a new refresh token each time we need to refresh an access token? We supposed to have the same refresh token for the whole period of time and when it is expired the use has to sign in again, am I not right?
I think the same. The refresh token expiration wouldn't make any sense.
It seems to me that it would be better to pass the refresh token to the HttpOnly cookie and write a custom ExtractJwt to get it from the request. It is a pity that I have not yet found anything more or less understandable on this topic on the Internet
what are the downsides of jwt token
Prisma part confused me, as I'm a beginner I started with typeorm
I'm so confuse, you create a refresh controller but where it can be use? there's no a function that whenever generate a new token it will check verify first the refresh token?
it happens is strategies I suppose
TypeError: this[modelKey].deleteMany is not a function 31 | ); 32 | // console.log(models.); > 33 | return Promise.all(models.map((modelKey) => this[modelKey].deleteMany())); | ^ 34 | } 35 | }
async cleanDatabase() { if (process.env.APP_ENVIRONMENT === 'production') return; const tables = [ 'users', //Other tables ]; await Promise.all( tables.map(async (table) => { const query = Prisma.sql`DELETE FROM ${Prisma.raw(table)} CASCADE;`; await this.$executeRaw(query); }), ); }
Been using async await fetch for a good while, I'll try axios for my next project.
must be a pun
Awesome video.
Thanks a lot. Very nice 🔥🔥
the update many was deleting all the rt token of all the user so he tests if the rf is not null
Thank for the course, i did all with you, i have a question, why don't delete de hast to, when do a logout???
Thank you, was struggling with the NameCheap Host entry part. (Just as you mentioned, everyone does this wrong. haha!) Also other parts of this tutorial got me over the finish line! Had done this process before entirely in AWS but new to using external domains.
Vlad, loved your video on NextJS on Free code camp. Thank you. Really appreciate it.
Thank you, very nice tutorial, i'll try to implement this with redis too. Sorry for my english and thank you again.
I purchased your nestjs essentials course but now page is not opening error occurred 403 forbidden. Please fix this soon I really enjoyed your lectures
Thank you for reporting. It should be back now!
Log out not working unauthorized? I think the default guard is making an issue
Hooks can be used in redux. How to use it with redux
one of the best videos in authentication using refresh tokens
Can't believe I made it all the way to the end!! Thanks so much.