Rest API with JWT Access & Refresh Tokens | Nodejs, expressjs, MongoDB, mongoose

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

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

  • @georgekalokyris
    @georgekalokyris 9 месяцев назад

    Great tutorial. Thanks Max. For anyone watching this in 2024 there are some minor changes in the repo at the auth controller. One of them is the refresh token validation.

  • @destocot1729
    @destocot1729 7 месяцев назад

    great video i learned a lot, was a bit fast paced tho but really great stuff with the wrappers

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

    Nice tutorial, congratulations!!! With your video I could improve my knowlegde about transactions and error handling.

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

    Nice to see someone is also using pino for logging. I like it but still trying to figure out log file rotation or spliting by size. Thank you for the tutorial. I subscribed your channel too. Good job.

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

    Excellent work my man!

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

    nice tut,
    Pros: speed is ok (anyways you pause at some point to take notes) , -> some parts when you copy / paste give some time to see the action, it made me confused a few times, because a lot of code is reused and pretty much all the functions look the same
    Cons: font is crazy small , really hard to read on small screens (12.9 ipad for example, 16" macbook) -> had to connect external monitor to see anything

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

    sick this is pretty straight forward

  • @tonnykirwa
    @tonnykirwa Год назад +2

    My humble request - kindly redo this video with normal size font - it's too small. I even went ahead to adjust to 1080P HD with no success.

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

    really good video !! thanks !

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

    hello for starting the projet, you need to go to src folder and execute the commane nodemon index.js, so before execute docker composer at the first no need to configure mongodb ?

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

      running the docker compose command will configure and start the database, then you can connect your app to the database

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

    Can you please provide a github link, the font was so hard to see.

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

      added the GitHub link in the description

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

    can someone assist me? I performed as the video instructed however I'm not getting userId in the decodedToken after performing the jwt.verify, i get the refreshtoken and accesstoken returned but there is nothing defined for userId, can someone help me please

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

      okay, so amazingly enough, after giving up after hours of wondering if I did something wrong, I walked away after commenting and now it works, fam, idk and i clearly need help from a greater power lol

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

      Glad to hear everything works 😊 taking a break and coming back with a fresh mind, that has helped me so many times

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

      @@codingwmax honestly, it's just funny how it's not working one moment and it's working the next, just another one of those days man, this is really overall a great tutorial, I can see myself implementing this foundation into other applications I'll be using in the future, so thanks. I'm gunna move onto ur kunernetes next, thanks again!

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

    Do you have any code on how to integrate frontend with this?

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

      I don't have any frontend code for this atm, but to point you in the right direction you would need to use a request interceptor or authentication interceptor which will automatically issue a request to refresh the access token when it expires.

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

      @@codingwmax Thanks for your answer! I have just one more question. If I would want to have only one session for each user, that meaning when a second login occurs for a user, the first refresh token should be deleted, how should I change the code?

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

    Fonts is crazily small ..can't see...

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

      Thanks for the feedback, I’ll ensure it’s more legible next time

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

    Way to fast and way to small fonts. Sorry.

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

      imo speed is ok (just pause and copy) , but can agree on font

  • @loganamwolverine4123
    @loganamwolverine4123 8 месяцев назад

    cant see shit plz upload better quality video