Authorization in NestJs : Roles & Permissions

preview_player
Показать описание
We implement Authorization using roles & permissions in NestJs.
We create our own custom @Permissions decorator and apply it to our routes, and then use it inside of our Authorization Guard to compare it against our user's set of permissions.

Timestamps:
---------------------
0:00 - Introduction + Code explanation
1:45 - How to store Roles & Permissions ?
6:12 - Creating the Role Schema
7:53 - Completing the Roles Module
10:45 - Creating @Permissions Custom Decorator
14:26 - Building the Authorization Guard
21:15 - Handling User Permissions
28:18 - Comparing Route Permissions with User Permissions
32:44 - Testing Authorization
34:26 - Video Summary
Рекомендации по теме
Комментарии
Автор

Best nestjs tutorial out here Thank you <3

thomasfichtner
Автор

I almost gave up on learning Nest until I came across your channel. Thank you man.

farhankhamran
Автор

I'm always looking forward to your videos, brother.

Imtiaz-lh
Автор

Thank you for the good content, as always

Naya-ssvs
Автор

wow, dude. it`s what i needed. i`ll try that

forwork
Автор

Thank you for your tutorial. I still dont understand how to implement Authorization for user to update their own resources (posts, settings, etc)

leson
Автор

can you make a video about nestjs graphql authentication over websocket?

soenghakkchoeurn