User Authentication | Node.js API From Scratch Using TypeScript, Express And MongoDB #2

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

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

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

    Hello! Hopefully you found this video useful. As usual all the code in this video is available on my GitHub (link in the description). If you have any issues or suggestions for future videos let me know in the comments 😀

    • @mizanurrahmanmunna9280
      @mizanurrahmanmunna9280 Год назад

      😁please add swagger-ui in this project. thank your for the great tutorial, i have learnt many things from this project.

    • @JayaniduKaushalya-k9g
      @JayaniduKaushalya-k9g 8 месяцев назад

      Bro, these two are the best Node.js tutorial with TypeScript and OOP that I've found on RUclips after watching thousands. Please continue your work keep it up bro!! Good luck!

  • @r.kucherenko
    @r.kucherenko Год назад +1

    brilliant demonstration of OOP approach in terms of express js. just brilliant

  • @musketeer245
    @musketeer245 Год назад

    For a beginner, your code and the way you explain, both are very easy to understand! After browsing so many videos on RUclips, I finally found your channel and videos. I really love to see future videos on front end react in typescript connecting to this backend.. :D

  • @ehsanhejazi184
    @ehsanhejazi184 2 года назад +2

    Thanks for this amazing tutorial parts (#1 & #2) and I would definitely recommend it to anyone who’s looking for a boilerplate to struct an express application using TypeScript

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

      Thank you, glad you found it useful 😀

  • @radosawmarek5804
    @radosawmarek5804 Год назад +1

    I wish you added unit tests here would be so cool

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

    I was looking for a tutorial for node and typescript and this is the best I could find. Thank you for your explanations and good luck with your youtube channel.

  • @isaachatilima
    @isaachatilima Год назад

    Nicely explained and the file structure and code splitting is awesome. Thank you so much for the series.

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

    Your videos are really useful, can you upload more? Thank you, sir.

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

    Really insightful tutorial. Will definitely apply this in my next project. Looking forward to more of your content.

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

    It is a well structured, detailed video about Typescript. It helps me a lot. Brother kindly, if you enlighten about the product list, update and delete the product with image upload (normal or S3) , it will be very beneficial. Waiting for your valuable response.

  • @iamlathindu
    @iamlathindu Год назад

    Both videos are awesome. tyvm

  • @imaginarywhale1412
    @imaginarywhale1412 Год назад

    Love the video. If you want to I would love a video on implementing tests.

  • @vatspatel7158
    @vatspatel7158 2 года назад +2

    Awesome explanation and very useful tutorials. I really want to know how to interact with two models using this structured project and how does array type in model will implement using interface. Waiting for the next part.

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

      Hi, thank you for the compliments :) I'll make a note of your suggestions, as I go through this tutorial series and expand upon the API I think I'll end up using multiple models in services and adding arrays to interfaces so your questions should get answered in future videos :D

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

    Excellent tuto. I would like that you show how to implement Dependency Injection Service -> Controller and Resfresh Token. Thanks so much!

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

      Thank you, dependency injection is definitely something I'd like to do in the future!

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

    for anyone haveing the catch errors, just set "useUnknownInCatchVariables": false, in your ts.config file..
    thanks Rettson

  • @radosawmarek5804
    @radosawmarek5804 Год назад +1

    Why no more extension im waiting for another episode

  • @mahdichaaben4882
    @mahdichaaben4882 Год назад

    NIce videos .. How to upload pictures from Node Typescript using cloudinary

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

    Awesome.
    Can you make unit and integration testing using jest for this project.

  • @successezeh2009
    @successezeh2009 Год назад

    Wow, thank you so much for this tutorial. I just completed this video and the first one and truly, I have learned a lot. A very special thanks to you🙂

  • @kwstasnere9207
    @kwstasnere9207 Год назад

    Hello, very good work. This OOP style helps me a lot to undestand!
    I have one question though.
    Why u add res.user = user on authenticated.middleware and not user.service in the register and login function.
    I mean that this expression will only run when make a call to '/' route.
    Isn't better to add on login and register methods?

    • @Rettson
      @Rettson  Год назад +1

      Hi, glad this video is helping you! The reason we add it on the middleware is because we then have the user available on every request that uses the authenticated middleware. If we only did it on the register/login methods we would assign res.user but it would only be available on requests to register/login routes.

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

    Hey man great video, I have a question... Do these apis follow rest standards?

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

    Please add a video for Google based authentication as well.

  • @sasakosutic7364
    @sasakosutic7364 Год назад

    Hi, thanks for great tutorial. I have a question authenticated middleware doesnt work on all routes, i tried putting it in other routes and somewhere its not working and somewhere works

  • @olalekanopadere9833
    @olalekanopadere9833 Год назад

    Hi, how do i return a customised json error if the route is not found?

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

    Hello.... I want to ask a question, what kind of design pattern are you using so I can study more on it

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

      Hi, I'm not aware of any particular design pattern I'm using here, I think the closest would be "Three-tier architecture". I usually just lay out the project in a way that makes sense and go from there. This blog post may help you out though if you're looking for some more reading - dev.to/santypk4/bulletproof-node-js-project-architecture-4epf - it's part of the inspiration for the api we're building in this series but it goes into more detail on some more topics that I might not end up covering. Hope this helps! :)

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

    hello... bearer.startsWith() or split() is showing an error(does not exist on type string[].. ts(2339)) tried to resolve but cannot find answer can you solve...

    • @OG-ql1sr
      @OG-ql1sr Год назад +1

      I think the problem is in bearer.split(“Bearer: “) should be bearer.split(“Bearer “)

    • @radosawmarek5804
      @radosawmarek5804 Год назад

    • @radosawmarek5804
      @radosawmarek5804 Год назад

      if anyone will have the same problem you guys need to do bearer.split(" ")[1] beucase in request.header.authorization it is something like that: Bearer [spacebar] token so you split this by empty string with spacebar and then your second argument i mean [1] will be the token :)

  • @radosawmarek5804
    @radosawmarek5804 Год назад +1

    hey bro, regarding to the decorator folder in definitions => custom.d.ts i did the same what you did and when i try to write unit tests for authenticated middleware im getting error that property 'user' doesnt exist on type Request any idea how to cope with that?