Multitenancy Authentication in NestJs

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024

Комментарии • 31

  • @dreamsachiever212
    @dreamsachiever212 5 месяцев назад +1

    thanks so much.one of the most underrated channel

    • @Computerix
      @Computerix  5 месяцев назад

      Thanks, it means a lot !

  • @tomaszstec5672
    @tomaszstec5672 2 месяца назад

    Great content !!! Every step explained. Nice job. Thank You.

  • @GabrielSantos-nx3zq
    @GabrielSantos-nx3zq 13 дней назад

    thanks for the content! How would we registers the users for specific tenants ?

  • @ilmanmanarulqori5632
    @ilmanmanarulqori5632 21 день назад

    Amazing 🤩

  • @Naya-ss7vs
    @Naya-ss7vs 5 месяцев назад

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

    • @Computerix
      @Computerix  5 месяцев назад

      I'm glad :) ❤️

  • @OussamaDouadi-i3j
    @OussamaDouadi-i3j 5 месяцев назад

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

  • @soenghakkchoeurn
    @soenghakkchoeurn 5 месяцев назад +3

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

  • @tomaszstec5672
    @tomaszstec5672 5 месяцев назад

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

  • @avinashchirame1779
    @avinashchirame1779 12 дней назад

    If i need different sub domains for different tenants and wanted to keep users details in tenants database instead of Master, so as to manage GDPR norms, what should i do? could you please help to fix this problem.

  • @juhandvan
    @juhandvan 5 месяцев назад

    Amazing, thank you so much

    • @Computerix
      @Computerix  5 месяцев назад

      You're very welcome!

  • @maintenance_informatique
    @maintenance_informatique 5 месяцев назад

    Thanks very much❤

    • @Computerix
      @Computerix  5 месяцев назад +1

      You're welcome !

  • @jahc007
    @jahc007 5 месяцев назад

    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  5 месяцев назад

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

  • @technoinfoworldwide2329
    @technoinfoworldwide2329 5 месяцев назад

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

  • @minhtrduc
    @minhtrduc 4 месяца назад

    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.

  • @waseemalhalabi5148
    @waseemalhalabi5148 Месяц назад

    Isn't it a good approach to store the tenant_id inside the JWT token rather that create a separated secret for each tenant? so there is no need for the client to send his tenant_id in the header

    • @Computerix
      @Computerix  26 дней назад

      Here there are 2 different points. I'm gonna reply to each separately :
      1) "Isn't it a good approach to store the tenant_id inside the JWT token.. so there is no need for the client to send his tenant_id in the header"
      => It is a valid approach, and you can definitely do that. However, in our case, I believe sending the tenant_id in the request header is actually cleaner. By doing this, we can use a middleware to first ensure that the tenant_id is valid before even verifying the token.
      If we were to store the tenant_id inside the JWT token, we'd have to move the tenant validity check from the middleware to our Guard. This would require the following steps:
      1- Decode the token to extract the tenant_id.
      2- Check if this tenant_id is valid and fetch the correct secret key for that tenant (assuming each tenant has their own secret key, which is the recommended approach for security when using multiple DBs).
      3- Use that tenant-specific secret key to verify the token.
      2) "Rather that create a separated secret for each tenant?"
      => Using the same secret key for all tenants introduces a significant security risk. If that key is compromised, all tenants in your system are at risk.
      However, by giving each tenant their own secret key (stored in their own database), you minimize the impact of a breach. If one tenant's secret is compromised, it only affects that tenant, while the others remain secure. This adds an important layer of isolation and protection for tenant data.
      It's worth mentioning, that this reply is specific to our decision of using different DBs for each tenant

  • @Computerix
    @Computerix  2 месяца назад

    Source code: github.com/charbelh3/NestJs-Multi-Tenancy

  • @nitishsingh925
    @nitishsingh925 5 месяцев назад

    need more videos

  • @MrHuflit
    @MrHuflit 3 месяца назад

    can you share this source code? thanks

    • @Computerix
      @Computerix  2 месяца назад

      Sorry for my late response.. here you go : github.com/charbelh3/NestJs-Multi-Tenancy