What are JSON Web Tokens? JWT Auth Explained [Tutorial]

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • Learn about JWT and how to use them for authentication. JSON Web Tokens are used for representing claims securely between two parties. In this tutorial , you will learn the JWT Auth flow without being distracted by a lot of extra libraries. This tutorial teaches JWT Auth as simply as possible.
    💻 Code: github.com/wei...
    🎥 Video from Thomas Weibenfalk. Check out his channel: / @weibenfalk
    --
    Learn to code for free and get a developer job: www.freecodeca...
    Read hundreds of articles on programming: freecodecamp.o...

ความคิดเห็น • 63

  • @pjguitar15
    @pjguitar15 3 ปีที่แล้ว +18

    How can I ever learn thing like JWT without videos like this? Reading docs doesn't help! Thank you so much!

    • @lunaticberserker5869
      @lunaticberserker5869 3 ปีที่แล้ว +4

      Wait until you see passportjs.

    • @krishgarg2806
      @krishgarg2806 2 ปีที่แล้ว +1

      @@lunaticberserker5869 well it is good to learn Jwt so you are not bound to one language. Even though I use node, I usually implement auth myself with jwt instead of passport.

  • @ProgrammingwithPeter
    @ProgrammingwithPeter 4 ปีที่แล้ว +9

    the community needed something like this! I couldn't explain this better even if i tried really hard!

  • @dajpeace
    @dajpeace 4 ปีที่แล้ว +3

    Great tutorial! This is exactly what I needed, thanks a lot and keep up with the awesome content.

  • @rajasthani_dj
    @rajasthani_dj 4 ปีที่แล้ว +5

    Thanks For this video.
    I'm looking for JWT and then today this video notification pop-up
    Thank again

    • @samirgyawali5207
      @samirgyawali5207 4 ปีที่แล้ว

      Notification occurred 😂🤣🤣🤣🤣🤣🤣🤣😅😅😂😂

  • @_xentropy
    @_xentropy 2 ปีที่แล้ว

    Thank you for making this so understandable.

  • @captainmeme9476
    @captainmeme9476 4 ปีที่แล้ว +17

    I never comment a video before, but I do it only for FCC, you are the light of a dark time, I'am sorry for not being able to make a donation, I live in a country where the online payment card are forbidden , where the technology and learning are just for governor's sons and the rich people , thanks you for the knowledge and you gave me hope after having lost you are the best school that I never could have with teachers that I never knew IRL, I'm sorry for not being able to make a donation, one day I will be the best,
    free camp code
    dear guardian of science

    • @zHqqrdz
      @zHqqrdz 4 ปีที่แล้ว +1

      Keep learning, the internet is the best school which you can attend at any age, for as long as you want :) Have fun man !

    • @parikshitrawat8680
      @parikshitrawat8680 3 ปีที่แล้ว +2

      Someone's who's into memes and code. You already have a very bright future bro.

  • @pariparia6033
    @pariparia6033 3 ปีที่แล้ว

    you are awesome man🌷🌷 thanks for sharing your knowledge😍🙏🏻

  • @mikeglaz
    @mikeglaz 4 ปีที่แล้ว +3

    There should be an npm package called slap-in-face (SIF) for when you forget an 's' on 'req.headers'...

  • @ComputerScienceAcademy5220
    @ComputerScienceAcademy5220 4 ปีที่แล้ว +2

    Sweet tutorial!
    By the way how much do you take to respond to an email on average?

    • @Weibenfalk
      @Weibenfalk 4 ปีที่แล้ว +1

      Well ... that depends if I'm busy with something else or not ... ;) But usually in 24 hours ...

    • @ComputerScienceAcademy5220
      @ComputerScienceAcademy5220 4 ปีที่แล้ว

      @@Weibenfalk I sent you an email. Waiting for a reply.

    • @Weibenfalk
      @Weibenfalk 4 ปีที่แล้ว

      Haven’t got any email.

  • @dangus1924
    @dangus1924 4 ปีที่แล้ว +1

    Awesome Video Love this channel contents! Thank you

  • @fujinafiul6044
    @fujinafiul6044 4 ปีที่แล้ว

    just a free pure gold for those who just want to know how to mine gold..! exactly what a beginner needed

  • @JohnWickXD
    @JohnWickXD 7 หลายเดือนก่อน

    severely underrated!

  • @RicardoAugustocom
    @RicardoAugustocom 4 ปีที่แล้ว +2

    How to persist the authenticated state after a page refresh?
    No GET api/url performed to refresh the token, just hit F5
    Edit: use a refreshToken

  • @AnkitSingh-bv5vg
    @AnkitSingh-bv5vg 2 ปีที่แล้ว +2

    28:30 Token and refresh token

  • @wkylinw8959
    @wkylinw8959 4 ปีที่แล้ว

    Very nice job!
    Thanks!

  • @danielarf4409
    @danielarf4409 4 ปีที่แล้ว +1

    Very nice job! Tanks to shared your acknowledgments!
    Anyone knows what's the font-family on vscode?

    • @Weibenfalk
      @Weibenfalk 4 ปีที่แล้ว

      It's Operator Mono =)

  • @CharlExMachina
    @CharlExMachina 4 ปีที่แล้ว

    What font are you using? It looks beautiful

  • @simardeepsinghmudhar7065
    @simardeepsinghmudhar7065 2 ปีที่แล้ว

    God Level Stuff , Loved it

  • @canmertinyo
    @canmertinyo ปีที่แล้ว

    thanks

  • @DanielK48
    @DanielK48 4 ปีที่แล้ว

    Does anyone know what font he is using ? Great video btw :)

    • @jobs408
      @jobs408 4 ปีที่แล้ว

      Operator Mono

  • @ratnachaitanya2663
    @ratnachaitanya2663 3 ปีที่แล้ว

    If iam logged in a website through auth redirect url token in one browser and again if iam logged in the same website in another browser, it creates another different url token for login . Then which url token will be registerd or tracked by that website ? either First one or next one..?? Thankyou for ur valuable answer in advance..!!

  • @garypweedman4686
    @garypweedman4686 2 ปีที่แล้ว

    Excellent

  • @emmahgigi7157
    @emmahgigi7157 4 ปีที่แล้ว +1

    Thsnk you

  • @gosnooky
    @gosnooky 4 ปีที่แล้ว

    You can do [, token] = authorization.split(' ');

    • @DiabloVal
      @DiabloVal 4 ปีที่แล้ว

      i find the video approach more useful but you can surely use it too.

    • @joe-un1ky
      @joe-un1ky 4 ปีที่แล้ว +1

      Yes, if you want to make the code less readable

    • @gosnooky
      @gosnooky 4 ปีที่แล้ว

      @@joe-un1ky How so?

  • @Franiveliuselmago
    @Franiveliuselmago 4 ปีที่แล้ว

    Small question about the CSS. Why use "list-style-type" instead of just "list-style" ?

  • @hamidmohammadi8570
    @hamidmohammadi8570 3 หลายเดือนก่อน

    Assuming backend just accept request that contain token. How can handle returned token from backend to use in all request of frontend(javaFX) that send to backend?
    My problem is handling token in frontend.

  • @JavaAidTutorials
    @JavaAidTutorials 4 ปีที่แล้ว +1

    *Awesome content*!! 👍👍

  • @fulpixel
    @fulpixel 4 ปีที่แล้ว

    Thank you!!

  • @koggism
    @koggism ปีที่แล้ว

    Pitty the camera was out of focus - but otherwise a good video

  • @jobs408
    @jobs408 4 ปีที่แล้ว

    I have so many questions sir, can I email you? Thanks!

  • @namankothari1129
    @namankothari1129 2 ปีที่แล้ว

    Can someone please explain me in simple words what did he say about versions w.r.t to refresh tokens?

  • @Parulvineetsharma
    @Parulvineetsharma 2 ปีที่แล้ว

    Awesome

  • @_xentropy
    @_xentropy 2 ปีที่แล้ว

    Prior to authentication, the password is sent to the server in plaintext? This seems like a problem. How do you solve that? Do you only accept authentication over https?

    • @_xentropy
      @_xentropy 2 ปีที่แล้ว

      Also, your vscode font is very nice.

    • @user-qk5mr8ez6y
      @user-qk5mr8ez6y 2 ปีที่แล้ว +2

      Sending passwords from the browser to the web server over HTTPS is standard practice. The password is encrypted by virtue of HTTPS as it is sent.

  • @quincejoz-bruer9858
    @quincejoz-bruer9858 4 ปีที่แล้ว

    Hello, In my refresh_token route, My token is successfully set, but when i'm trying to request it. And im console.log it out. it return undefined? How can i solve this please

    • @enesguler6034
      @enesguler6034 3 ปีที่แล้ว

      In index.js file put a slash (/) before refresh_token in line server.post('refresh_token')

  • @quincejoz-bruer9858
    @quincejoz-bruer9858 4 ปีที่แล้ว

    If i'm using mongoDB as my database, how can i add my refresh token in my user table

  • @abhishekmazumdar2072
    @abhishekmazumdar2072 4 ปีที่แล้ว +1

    You are from Sweden? Say hi to Zlatan!

  • @panachaiboonyoo1553
    @panachaiboonyoo1553 ปีที่แล้ว

    20:11

  • @anton9122
    @anton9122 22 วันที่ผ่านมา

    Sounds swedish 😂

  • @growtoups
    @growtoups 3 ปีที่แล้ว +1

    i dont want to hurt your feeling but im tired of indian accent there's too much

    • @wonderman8537
      @wonderman8537 3 ปีที่แล้ว +7

      He isn't an Indian 😑, he's Swedish

    • @almanduku9043
      @almanduku9043 3 ปีที่แล้ว +5

      His accent doesn't seem like indian burrruuuuuuhh

    • @pariparia6033
      @pariparia6033 3 ปีที่แล้ว

      you don't want but you do :| , Imagine how hard it is to be Iranian and listen to English with an Indian accent😆😆

  • @sakshamverma9981
    @sakshamverma9981 2 ปีที่แล้ว +1

    09:24 i will ofcourse use wwibenrules. Yeeaaayyyy