NestJS: Guard for PUT Request, verify UserIsUser | Blog Project V-15

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

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

  • @compncheese8358
    @compncheese8358 2 года назад

    This guy is awesome, he put the repo

  • @buldog789
    @buldog789 2 года назад +1

    great video, thanks to u i was able to secure my endpoint.

  • @taherr1341
    @taherr1341 3 года назад +2

    The whole course is invaluable. All the best.

    • @TommiCodes
      @TommiCodes  3 года назад

      Thanks! Great to hear :)

  • @hamzahahmad1670
    @hamzahahmad1670 3 года назад +1

    I've been searching for this for a while now. Thank you

  • @armandomen2944
    @armandomen2944 4 года назад +1

    Thank you for being thorough, but especially for putting the repo!!!!!!!

    • @TommiCodes
      @TommiCodes  4 года назад

      Thanks for the feedback man!

  • @albertoarielarce2982
    @albertoarielarce2982 3 года назад +1

    Thanks for this tuturial!

  • @QuangTran-qg6ri
    @QuangTran-qg6ri 5 месяцев назад

    I am confused about why don't we just check valid user by simply comparing between current user (by jwt token) vs current path, does additional query to DB is redundant in this case?

  • @AnhTuanNguyen-vc9qf
    @AnhTuanNguyen-vc9qf 4 года назад +1

    Tks for Part14 :D

  • @faiwi9646
    @faiwi9646 3 года назад

    Where is secret recipe of RoleGuards which you implements?

    • @TommiCodes
      @TommiCodes  3 года назад

      secret is in the .env file, if i understood the question correct

  • @sophia8925
    @sophia8925 3 года назад

    Hello Thomas, thank you so much for this playlist. I'm having a problem with the UserIsUser, I receive a "message": "Bad Request Exception" every time the id=id instead of returning the user. Do you have any idea why?

    • @TommiCodes
      @TommiCodes  3 года назад

      Check against the github repo, or share the link to your repo, so that we can check :)

  • @vincenzoieva3400
    @vincenzoieva3400 3 года назад

    Hi Thomas, thanks for your videos. I guess we should even use UserIsUser for uploadFile controller. Is it correct?

    • @TommiCodes
      @TommiCodes  3 года назад

      Depends on the case.
      But yes, you should check that you are allowed to do so.
      (I am currently not directly remembering, if i were using this back then - but you can always have a look at github and also expand the project scope :))

  • @tranhung4010
    @tranhung4010 4 года назад

    I saw you have imported hasRoles method is not used in roles.guard.ts file.

    • @TommiCodes
      @TommiCodes  4 года назад +1

      hasRoles() is used in the controller

  • @achrefbannouri2995
    @achrefbannouri2995 3 года назад

    Hello Thomas and thanks for the amazing tutorial. But i seem to have an issue : request.user is undefined. any ideas on how to fix this?

    • @TommiCodes
      @TommiCodes  3 года назад

      Did you send the jwt with the request.
      If we need to look further, it would be good to send a github link

    • @achrefbannouri2995
      @achrefbannouri2995 3 года назад

      @@TommiCodes Hi Oliver, yes that was the issue I didnt use the JwtGuard, you're awesome thanks!

  • @tranhung4010
    @tranhung4010 4 года назад

    what does roles mean.

    • @TommiCodes
      @TommiCodes  4 года назад +1

      See more in video 4. ruclips.net/video/Wzn1rzqPq_s/видео.html

    • @TommiCodes
      @TommiCodes  4 года назад +1

      Or specify the question please. Role belongs to a user. In this case a user can be an admin, or a user, ....

    • @tranhung4010
      @tranhung4010 4 года назад +1

      @@TommiCodes thanks I will support to watch your video every time there is a new video that is uploaded.