NestJS Refresh Token: Step By Step Guide With Passport.JS

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

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

  • @SakuraDev
    @SakuraDev  6 месяцев назад

    Hey Developers! Please Like, Share, Subscribe, and comment your thoughts below-your support means a lot to me! ❤❤❤

  • @olagokebankole5853
    @olagokebankole5853 6 месяцев назад +2

    This particular series has come handy for a particular project i actually want to start, keep up the energy.

    • @SakuraDev
      @SakuraDev  6 месяцев назад

      That's fantastic to hear! I'm glad the series has been helpful for your project. Your support and enthusiasm motivate me to continue creating valuable content.

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

    Dude thank you so much for this video. It saved me so much time!

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

      Thanks 🙏, I am glad it was helpful

  • @Mahadev-x7u
    @Mahadev-x7u 6 месяцев назад +1

    Excellent…🔥🔥🔥💯🏄‍♂️ thank you 🙏

    • @SakuraDev
      @SakuraDev  6 месяцев назад

      You're very welcome! I'm glad I could help. ❤️❤️

  • @raidthabet9074
    @raidthabet9074 6 месяцев назад

    Keep up the great work!

    • @SakuraDev
      @SakuraDev  6 месяцев назад

      Thank you! I appreciate the encouragement. I'll keep doing my best! 😊

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

    Can I have the name of the theme and the icon pack you used in the video please? They look interesting. Good video

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

      Hi, Material icons, bearded theme and jetbrains font

  • @swarnakadeepashan5277
    @swarnakadeepashan5277 17 дней назад

  • @apdiwhapmohmet4458
    @apdiwhapmohmet4458 6 месяцев назад +1

    Please add more features like role based authorization

    • @SakuraDev
      @SakuraDev  6 месяцев назад +2

      That's a great suggestion! Role-based authorization (RBA) is a crucial aspect of building secure applications. I'll definitely consider adding more content on RBA to the course.

    • @apdiwhapmohmet4458
      @apdiwhapmohmet4458 6 месяцев назад

      @@SakuraDevThanks pro

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

    Could we create a video illustrating a scenario where a user attempts to log in on multiple devices? This method won't support refreshing tokens across all active login sessions.

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

      I will search for the solution and create a video about that.

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

      An option for this is to store refresh tokens in relation to the user, so a user can have several refresh tokens, making it possible to even invalidate sessions, have a limit on connected devices, etc.

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

      @@Luizimbatera Thanks for sharing

  • @tutuacs2827
    @tutuacs2827 6 месяцев назад

    Hey, I'm trying to create a context for my navbar to display some user properties that can change over time. I want to update this context both when the token is refreshed and in some client-side components.
    For example, the user has a number that ranges from 1 to 5 and increases every 4 hours. Sometimes, this number might decrease on the site. I would like to update the navbar context every time the token is refreshed (using the refreshToken function in authOptions) and also when certain client-side components are used. Is this possible?

    • @SakuraDev
      @SakuraDev  6 месяцев назад +1

      Hey @tutuacs2827! Use React's Context API to manage and update user properties. Update the context in your refreshToken function and in client-side components as needed. This will keep your navbar in sync with the latest data. If you need more details, feel free to ask!

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

    How about storing refresh token in a http cookie instead of sending it in a response?

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

      Yes we can do that as well. 💯

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

      @@SakuraDev ❤‍🔥