Computerix
Computerix
  • 47
  • 305 719
Multitenancy Authentication in NestJs
We learn how to authenticate users in a multitenant application, where each tenant has their own unique secret key for generating and verifying access tokens.
Your donations are highly appreciated: buymeacoffee.com/computerix
Timestamps:
--------------------
0:00 - Multitenancy Implementation Recap
6:10 - Authentication: Single Tenant vs Multi-Tenant
9:40 - Overview of our tasks
11:24 - Create new tenant API
18:40 - Handling Tenant JWT Secret keys
36:14- Creating our Login API
42:42- Creating our Tenant Auth Guard
52:23- Summary
zhlédnutí: 416

Video

NestJs Authentication: Change Password, Forgot Password, Reset Password
zhlédnutí 824Před měsícem
In this video we learn how to handle a user changing their password, forgetting their password, receiving a reset password link and handling it properly in a Nestjs backend. Part 1 : czcams.com/video/h-68sqxycJY/video.htmlsi=p6S6f8nRpuXDyImw Feel free to donate: buymeacoffee.com/computerix Source Code: github.com/charbelh3/nestjs-auth-apis Timestamp: 0:00 - Part 1 Recap 1:30 - Overview and goal...
NestJs Authentication : Login, Signup, Refresh Tokens, JWT, Guards
zhlédnutí 1,6KPřed měsícem
We implement : Login, Signup and Refresh Tokens APIs and learn the differences between an access and a refresh token, and how to handle them in our authentication flow. Configuration episode: czcams.com/video/6MjjOsODYwU/video.htmlsi=79fw-Iw_qPgurZyM MongoDB episode: czcams.com/video/GV9quNoXRgg/video.htmlsi=GQvEAaR0-N_o0Pib You can donate here: buymeacoffee.com/computerix Make sure to leave a ...
Websockets in NestJs (Real-Time Chat App)
zhlédnutí 1,7KPřed měsícem
We learn how to setup a websocket gateway in Nesjts, to subscribe to events, and emit messages. We learn different ways to broadcast messages, and consume them from a client, while building a simple chatting app Donations: buymeacoffee.com/computerix Timestamps: 0:00- Creating the Websocket Gateway 2:38- Listening to events 5:37- Emitting Messages to the client 7:55- Brodcasting messages Websoc...
NestJs Microservices with RabbitMQ
zhlédnutí 7KPřed 3 měsíci
We build a Producer and a Consumer that communicate through RabbitMQ in NestJs. We learn how to implement both event driven and RPC solutions. If this video was helpful, leave a like & subscribe! Github Repo: github.com/charbelh3/NestJs-Microservice-RabbitMQ Timestamps: 0:00 - Introduction 1:25 - Creating a RabbitMQ client instance 3:55 - Producing an event to RabbitMQ 6:40 - Connecting our Con...
NestJs - Best Practices + Implementations
zhlédnutí 2,8KPřed 4 měsíci
We discover different best practices and how to implement each with practical examples, to ensure a clean and maintenable nestjs project. Detailed Videos from my nestJs Course: Pipe & Validations: czcams.com/video/-IJ2MynZqg8/video.html Error Handling: czcams.com/video/AWqqg9Dtnc4/video.html Guards & Authorization: czcams.com/video/w_ASqSZKhMQ/video.html Donations Link : buymeacoffee.com/comput...
NestJs caching with Redis
zhlédnutí 3,9KPřed 5 měsíci
We learn how to implement caching properly using the cache manager package in NestJs, and using the redis store to cache data in redis. Buy me a coffee at : buymeacoffee.com/computerix Timestamps: 0:00- Why use caching ? 1:02- Implementing caching in NestJs 6:28- Using the Cache Interceptor 9:19- Using the Redis Cache Store
Multitenancy in NestJS + Mongoose
zhlédnutí 4,4KPřed 6 měsíci
Learn how to handle multitenancy in NestJS with Mongoose in this easy-to-follow tutorial. Where we learn how to connect to the correct dedicated tenant database based on the tenant making the request. Github Repo: github.com/charbelh3/NestJs-Multi-Tenancy Buy me a coffee at : buymeacoffee.com/computerix Timestamps: 0:00- Single-Tenant vs Multi-Tenant 2:13- Our Multi-Tenant Application 4:45- Exp...
NestJs - MongoDB [11]
zhlédnutí 503Před 6 měsíci
We learn how to connect to a mongoDb database using the NestJs mongoose package. We cover multiple concepts: 1- Different ways we can connect to a database 2- Creating a Schema 3- Registering a model 4- Injecting that model and using it as a dependency 5- Exporting models 6- Using multiple databases 7- Accessing the mongoose Connection object Timestamps: 0:00- Introduction 1:00- Connecting to o...
NestJs - Configuration [10]
zhlédnutí 1,4KPřed 7 měsíci
We cover the importance of using .env files to ensure the security of our sensitive data, and we learn how we can use the nest ConfigModule to access our configuration variables. Timestamps: 0:00 - Avoid critical configuration mistakes 0:46- Using .env files to read variables 3:19- Registering and understanding ConfigModule 6:25- Loading custom configurations 8:18- Reading config variables with...
NestJs - Interceptors [09]
zhlédnutí 1,5KPřed 8 měsíci
We learn how we can intercept a request, and add logic BEFORE and AFTER getting a response from the route handlers. We learn different use cases in which providers could be useful, and more... Please like & subscribe ! Timestamps: 0:00 - Interceptors and their purpose 1:03 - Creating our custom interceptor 4:50 - Different ways of registering our custom interceptors 8:43 - Intercepeting the rou...
NestJs - Guards & Authentication & Authorization [08]
zhlédnutí 8KPřed 11 měsíci
We learn the use and roles of Guards, how we can create different guards for authentication and authorization. How we can bind guards to different levels (method, controller and global scoped). If this video was helpful, leave a like and subscribe :) Timestamps: 0:00 - Guards, Authentication and Authorization 4:21- Creating our Authentication Guard 10:54- Creating a JWT Token 12:35- Using the J...
NestJs - Pipes & Validation [07]
zhlédnutí 2,4KPřed rokem
We cover the 2 different use cases for pipes. Using the built-in out of the box pipes, and creating your own custom pipe. We also cover 2 different ways of validating request inputs in our application. If this video was helpful, make sure to leave a like & subscribe :) Timestamps: 0:00- What is a pipe? 2:30- Understanding the Pipe arguments 4:43- Using a transformation pipe 8:12- Introducing Bu...
NestJs - Exception Filters [06]
zhlédnutí 3,3KPřed rokem
We see how Nest handles exceptions, the different out of the box exception types that we can use. How we can create our own exception filters and use them, etc.. Timestamps: 0:00- How Nest handles thrown errors by default 3:08- Throwing HttpException with different properties 7:08- Different Built-in HTTP exceptions 10:08- Exception Filters 13:20: Applying our custom Exception Filter 16:11- Sum...
Nestjs - Middlewares [05]
zhlédnutí 1KPřed rokem
We dive deep into functional and class based middlewares, where they fit in our application. How to apply them either globally or to specific routes with examples. Timestamps: 0:00 - What Are Middlewares ? 1:03 - Functional Middlewares 5:53 - Class Based Middlewares 7:38 - Class Based vs Function Based Middlewares 8:27 - Registering Class Based Middlewares 10:05 - Global and Route Based Middlew...
NestJs - Modules [04]
zhlédnutí 1,8KPřed rokem
NestJs - Modules [04]
NestJs - Service Providers & Dependency Injection [03]
zhlédnutí 3,3KPřed rokem
NestJs - Service Providers & Dependency Injection [03]
NestJs - Controllers [02]
zhlédnutí 1,1KPřed rokem
NestJs - Controllers [02]
NestJS - Introduction & Setup [01]
zhlédnutí 2,1KPřed rokem
NestJS - Introduction & Setup [01]
RabbitMQ - RPC with NodeJs (request-reply pattern)
zhlédnutí 7KPřed rokem
RabbitMQ - RPC with NodeJs (request-reply pattern)
Pagination in Nodejs using Mongoose (return totalPages, totalCount & More)
zhlédnutí 1,3KPřed rokem
Pagination in Nodejs using Mongoose (return totalPages, totalCount & More)
What is an API ? (Only video you need)
zhlédnutí 155Před rokem
What is an API ? (Only video you need)
Best Global Error Handler Middleware in Nodejs !
zhlédnutí 791Před rokem
Best Global Error Handler Middleware in Nodejs !
Entity Framework Core Load FULL Related Entities (Lazy Loading and Eager Loading)
zhlédnutí 1,6KPřed rokem
Entity Framework Core Load FULL Related Entities (Lazy Loading and Eager Loading)
Promise.race() to handle request timeouts in JS (explanation + examples)
zhlédnutí 271Před rokem
Promise.race() to handle request timeouts in JS (explanation examples)
ASP.NET Core 6.0 Code first approach using Entity Framework
zhlédnutí 10KPřed rokem
ASP.NET Core 6.0 Code first approach using Entity Framework
Promise.all vs Promise.allSettled (Js) | Sort the confusion #1
zhlédnutí 94Před rokem
Promise.all vs Promise.allSettled (Js) | Sort the confusion #1
NodeJs Microservices using RabbitMQ (Message Queueing)
zhlédnutí 35KPřed rokem
NodeJs Microservices using RabbitMQ (Message Queueing)
RabbitMQ basics (Including different exchange types + real use cases)
zhlédnutí 5KPřed 2 lety
RabbitMQ basics (Including different exchange types real use cases)
C# Polymorphism in 5 minutes!
zhlédnutí 2,6KPřed 2 lety
C# Polymorphism in 5 minutes!

Komentáře

  • @dashaxedit
    @dashaxedit Před 9 hodinami

    Thank you. Now I got the understanding of rabbit mq. Keep going

  • @juhandvan
    @juhandvan Před 13 hodinami

    Great! You make it easier.

  • @sraanv5875
    @sraanv5875 Před dnem

    very helpful thank you

  • @juhandvan
    @juhandvan Před dnem

    I really like your video. Thanks

  • @Mr_MicDaniel
    @Mr_MicDaniel Před dnem

    Thanks for this, I will love it if you add your GitHub repo in description

  • @denisvolper9786
    @denisvolper9786 Před dnem

    Really great demonstration and explanation! Thank you!

  • @pateltanaka49
    @pateltanaka49 Před 2 dny

    much better understanding, big time, as someone whose using nestjs in production env also

  • @mohammadsubhan1524
    @mohammadsubhan1524 Před 2 dny

    Thanks bro 👊

  • @HamzahAhmad-db5cy
    @HamzahAhmad-db5cy Před 3 dny

    Excellent video. Thank you for your effort. is there a particular reason why you used a different package for refresh tokens, instead of using the jwt package here as well?

    • @Computerix
      @Computerix Před 3 dny

      Since the refresh token is not a JSON Web Token but rather a random string, we used a random generator

  • @faizanrasool9241
    @faizanrasool9241 Před 5 dny

    just a little bit learning not good fit they skipping the main points

  • @leopernod5402
    @leopernod5402 Před 7 dny

    Thanks you saved my career man

  • @andr4chik399
    @andr4chik399 Před 8 dny

    wtf, you update refresh token per request why????? also why you protected all routes instead of what you real needed, video is like 5/10. good start - bad finish

    • @Computerix
      @Computerix Před 8 dny

      You misunderstood the point. I called the refresh token API multiple times on purpose to show the behaviour. Of course you shouldn't call it unless the access token expires -.- + We added the authGuard on the controller level to protect all routes, assuming this is our use case.

  • @Nscb1947
    @Nscb1947 Před 8 dny

    could you please put up github link?

  • @saurabhtalele1537
    @saurabhtalele1537 Před 9 dny

    🎉🎉

  • @SakshamKarnawat
    @SakshamKarnawat Před 10 dny

    Amazing explanation. Thanks a lot!

  • @SivaliBalu
    @SivaliBalu Před 11 dny

    Really awesome work !! thanks

  • @minhtrduc
    @minhtrduc Před 12 dny

    Suppose that we build something like SASS: There are 3 companies/partners in our system (A, B, C), every company has their own users and products. There are 2 roles with permissions and root-admin for system. Let authorize for them. Wow @@, hope u make some tutorial about it.

  • @technoinfoworldwide2329

    we need one full project on nestjs with prisma and postgresql following microservice

  • @jahc007
    @jahc007 Před 13 dny

    Thank so much. One question, How can I improve product provider. I have read about dynamic modules to do that, could it work?

    • @Computerix
      @Computerix Před 13 dny

      You're welcome! Can you clarify what you mean by improve the product provider?

  • @OussamaDouadi-i3j
    @OussamaDouadi-i3j Před 13 dny

    You saved my life!!! please keep going! Thank you so much

  • @tomaszstec5672
    @tomaszstec5672 Před 13 dny

    Oh that is a very nice job!!! Thanks!

  • @ismaeltinta6118
    @ismaeltinta6118 Před 14 dny

    thanks so much.one of the most underrated channel

  • @juhandvan
    @juhandvan Před 14 dny

    Amazing, thank you so much

  • @nitishsingh925
    @nitishsingh925 Před 14 dny

    need more videos

  • @soenghakkchoeurn
    @soenghakkchoeurn Před 14 dny

    Can u revised to use Prisma, postgres, graphql ? 😊

  • @maintenance_informatique

    Thanks very much❤

  • @Naya-ss7vs
    @Naya-ss7vs Před 14 dny

    My favorite creator dropped a video again! Can't wait to watch it fully

  • @piyumalchandrarathna5169

    great explanation.❤

  • @piyumalchandrarathna5169

    Thank you bro. subscribed

  • @ismaeltinta6118
    @ismaeltinta6118 Před 18 dny

    For a best user XP, it actually makes sense to delete a reset token already generated as users might request multiple times. so it would be good to check if there's a token generated by the user email we delete it before creating a new one attached to the same email. this way only the last generated token will work

    • @Computerix
      @Computerix Před 18 dny

      Yes most definitely!

    • @ismaeltinta6118
      @ismaeltinta6118 Před 17 dny

      @@Computerix Thanks a ton for your videos. I am learning a lot and actually successfully implemented authentication thanks to you. Looking forward to the upcoming videos

  • @yerkebulanzhaukenov138

    Amazing thanks bro! Which keyboard do u use bro, sounds like music from heaven)

    • @Computerix
      @Computerix Před 18 dny

      You're welcome ! Keyboard is XPG infarex K20. It does sound satisfying :)

  • @charondsgn
    @charondsgn Před 19 dny

    Thank you legend 🔥🔥

  • @maximvoicu4155
    @maximvoicu4155 Před 21 dnem

    loved ur explanation. Would be great to see u implement 1. passport for multiple types of authentication 2. may be role based access with permissions

    • @Computerix
      @Computerix Před 18 dny

      I'm glad you enjoyed it! Planning on making a roles and permissions video with permission based authorization

  • @andresinalbis6651
    @andresinalbis6651 Před 25 dny

    LIKE GOES

  • @Moudiyusef
    @Moudiyusef Před 28 dny

    Keep going

  • @rohanpawar2301
    @rohanpawar2301 Před 28 dny

    great tutorial

  • @MilkyWayy18
    @MilkyWayy18 Před 29 dny

    github link?

  • @Computerix
    @Computerix Před 29 dny

    Source code: github.com/charbelh3/nestjs-auth-apis

  • @JoyceWen-py1pb
    @JoyceWen-py1pb Před měsícem

    Hello, Your videos have been incredibly helpful to me. I was wondering if we could eventually have the instructional video you mentioned on unified identity verification. I really need it. Thank you, but unfortunately, I can't sponsor you from my region. I apologize.

    • @Computerix
      @Computerix Před měsícem

      I'm glad my videos are helpful! I am going to create an authentication video for multitenancy soon, meanwhile feel free to watch this authentication video that I uploaded a week ago : czcams.com/video/h-68sqxycJY/video.htmlsi=VeiWno8dL0UA2ike It's going to be similar, except we're gonna be using different secret keys for different tenants (these keys would be stored in the database)

    • @JoyceWen-py1pb
      @JoyceWen-py1pb Před měsícem

      @@Computerix Okay, looking forward to your new videos.

  • @TayyabMalik-ek8rk
    @TayyabMalik-ek8rk Před měsícem

    can you share the source code

    • @Computerix
      @Computerix Před 29 dny

      Here you go github.com/charbelh3/nestjs-auth-apis

  • @juhandvan
    @juhandvan Před měsícem

    Can you share me the source code of this video. Thank you so much

  • @abdrahim9307
    @abdrahim9307 Před měsícem

    love your content 🎉

  • @nitishsingh925
    @nitishsingh925 Před měsícem

    we need more videos

  • @arentalb4765
    @arentalb4765 Před měsícem

    That was fast and good ❤