React JWT Authentication

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 2024

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

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

    I thank you very much, I have been perfecting my skills in fronted in 3 technologies, thanks to your videos Angular, Vue and React.
    A sugestion in case of someone have a problem with router:
    This is the solution being today one date one year after this video.
    Because update in React




    Thanks so much

  • @Daniel-qs4yw
    @Daniel-qs4yw 3 ปีที่แล้ว +5

    Really good job! Please continue explaining react in typescript! Very helpful!

  • @rumate87
    @rumate87 3 ปีที่แล้ว +21

    Actually, this video doesn't touch the topic of the JWT Authentication, it is rather about React and React Router.

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

      yea :')

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

      @a z I found articles on the Internet explaining how to implement JWT authentication.

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

      @@rumate87 link please?

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

      @@rumate87 please I would like links on articles about JWT

  • @DanielTamayo-wn5lu
    @DanielTamayo-wn5lu 2 หลายเดือนก่อน

    Very thanks for the tutorial ❤

  • @umerfarooq3121
    @umerfarooq3121 3 ปีที่แล้ว +6

    I love React Please do some more real world stuff using it.
    Thank you.

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

    Your explanation is good but where is the JWT here?

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

    You deserve so much love for this video ur the best

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

    Best explanation 👍

  • @muhammadrizwan-iz8er
    @muhammadrizwan-iz8er 3 ปีที่แล้ว +6

    Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    what to do?????

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

    Thank you for this guide sir.

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

    Great man.. you have covered topics out of box..

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

    thank u bro you're a life saver

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

    Thanks man, big help :)

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

    Well man your videos are awesome.

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

      Thanks, share it with your friends :)

  • @friedrichvillegasmurillo9775
    @friedrichvillegasmurillo9775 10 หลายเดือนก่อน

    all we needes here is persistent login, that would be great

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

    for the logout do we have to include credential in fetch call?

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

    What if I call the APIs from a different domain, will that still work? The cookie I mean?

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

    Pls @ScalableScripts what is the extension you use for the auto completion of react components?
    And what extension for the displaying of the light gray indicators that show what each argument is for in the functions you write in the video?
    Also, thanks a lot for this material, it's very well explained!

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

      I'm using PHPStorm

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

      if you're using vscode, you can use the ES7 Snippets addon to create boilerplate components like that, the input is 'rafce' (they lack semicolons, but running Prettier on the component will fix that)

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

    It’s not JWT

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

    tks u sir, can u make another video about how to protect route with jwt plz

    • @muhammadrizwan-iz8er
      @muhammadrizwan-iz8er 3 ปีที่แล้ว

      Failed to load resource: the server responded with a status of 500 (Internal Server Error)
      could u help me resolve this?
      After registration, it goes to login but after login, it shows this error.

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

      @@muhammadrizwan-iz8er if you see this message the problem is yo dont need to close db server be shure you db lochalhost 8000 working

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

    26:24 when I try to log in, the cookie doesn't arrive. In Chrome Dev Tools I get the issue "Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute". I'm using the Django backend.

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

      hi, I am having the same problem. Did you found any solution?

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

      @@maidarotgon9453 me too

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

      @@maidarotgon9453 any solution?

    • @Gamer-bg7rb
      @Gamer-bg7rb 2 ปีที่แล้ว

      @@jacksonpatrick3454 I had a problem that the API was on https, and the frontend was on http. Changed everywhere to http

    • @РоманСеменов-я2х
      @РоманСеменов-я2х 2 ปีที่แล้ว +1

      should be in laravel in session.php:
      'secure' => true,
      'same_site' => "none",

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

    Hey brother, I followed your Django JWT tutorial and am here to give it a React frontend. I am using axios for requests. The problem I am facing is, I'm not able to set the cookie via axios. If I do a post request in Django REST page, it works well, but fails on requesting from axios. Please help.............

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

      Do You Find The Solution Of This Problem?

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

      @@mahmoudkhallaf8677 did you ? i'am facing the same problem

  • @Nico-su1ku
    @Nico-su1ku 3 ปีที่แล้ว +1

    Hi and thanks for all your videos, i'm learning React but using .js files Can you tell me what's the difference, chers.

    • @muhammadrizwan-iz8er
      @muhammadrizwan-iz8er 3 ปีที่แล้ว +1

      Failed to load resource: the server responded with a status of 500 (Internal Server Error)
      could u help me resolve this?
      After registration, it goes to login but after login, it shows this error.

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

      I'm also wondering this.

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

      He's using typescript. It's basically a "typed" javascript

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

    Please create videos on the CRUD operation using Nest-React-Redux-TypeScirpt. Even if you have a premium course on it, you can send me the course link. Thanks.

  • @DeepakGupta-pz4fx
    @DeepakGupta-pz4fx 3 ปีที่แล้ว +1

    Please make on video Redux tutorial

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

    Im not getting cookies even though i set withcredentials=true. In console it show "SameSIte" attribute warning.. DOnt know how to fix this

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

    @ScalableScripts Any idea how to solve SameSite attribute problem?

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

      facing same issue. did you solve it?

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

    Can you please make a video that explain how to make a JWT with struts2/spring and send it to an angular application? please I realy need it

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

    thanks a lot sir

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

    Internal error 500 if I try to post...

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

    hello i use this code with laravel backend but when i try to login using react frontend i have this error in the consol "The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'

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

    hi awesome work, please make vuejs 3 jwt authentication video

  • @rakibahsan6786
    @rakibahsan6786 8 หลายเดือนก่อน

    not working with next js 14 any other way ?

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

    Thanks for the fantastic demo.
    The only problem I hit was that once I added credentials: 'include', I started getting CORS errors and could no longer send/receive requests to the server.
    Any idea how to get around the CORS issue?

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

      Which backend did you use?

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

      @@ScalableScripts A custom lambda that exposes APIs for CRUD operations on the database. I'd set the allow origins header to "*" but apparently that doesn't work once you start using credentials.

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

      Understood I think you should enable credentials in your lambda that may be your problem. Something like 'Access-Control-Allow-Credentials': 'true'

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

    @22:00 on clicking register i'm getting Status Code: 500 Internal Server Error can you help me with this?

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

    @26:20 , I get different cookies named crsftoken and sessionid and not 'jwt'. I get the correct jwt cookie in postman, but not in the browser. I have searched around for a solution for a while now, would love some insight.

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

      facing same issue. did you solve it?

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

    How do i authorize the current user in headers?
    I can't seem to get request.user using this process?

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

    am getting 403 error when submitting the loginform am using django-rest how to fix it

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

      facing same issue. did you solve it?

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

    how can hook the frontend to the node.js backend?

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

    awesome

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

    SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again (SQL: select * from information_schema.tables where table_schema = auth and table_name = migrations and table_type = 'BASE TABLE')
    at vendor/laravel/framework/src/Illuminate/Database/Connection.php:678.. ERROR on start.sh any idea how to fix IT!! ???

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

    Hi. do you have auth-api on another platform other than docker?

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

      Nope, you can select one of the other backends in the description

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

      I'd like to see JWT with Firebase and React.

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

    You have not shown backend

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

      I have a link for every backend in the description...

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

      @@ScalableScripts can you please reply with link

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

      ​@@Skullandroses188
      React and Laravel JWT Authentication: th-cam.com/play/PLlameCF3cMEuSQb-UCPDcUV_re5uXaOU9.html
      React and Django JWT Authentication: th-cam.com/play/PLlameCF3cMEtfyO6H7WXUAqoIJO21bDNp.html
      React and NodeJS JWT Authentication: th-cam.com/play/PLlameCF3cMEtiOUjWPmrrFYyLHLHoYmEO.html
      React and Golang JWT Authentication: th-cam.com/play/PLlameCF3cMEuXdBAqa4v8CsbjGnpic71H.html
      React and NestJS JWT Authentication: th-cam.com/play/PLlameCF3cMEuP6lovCY66kIZ4WyNVq1_m.html
      React and Deno JWT Authentication: th-cam.com/play/PLlameCF3cMEu3qhKzCV66_3O9Ozc0BMt9.html
      React and C# JWT Authentication: th-cam.com/play/PLlameCF3cMEtY5S-9aVlCobcfDdbmpjPa.html
      React and Kotlin JWT Authentication: th-cam.com/play/PLlameCF3cMEtCGZW2djY46Dl20-uSNJba.html

    • @muhammadrizwan-iz8er
      @muhammadrizwan-iz8er 3 ปีที่แล้ว

      Failed to load resource: the server responded with a status of 500 (Internal Server Error)
      could u help me resolve this?
      After registration, it goes to login but after login, it shows this error.

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

    while refreshing the main page showing u r already login, before I am login …??

    • @muhammadrizwan-iz8er
      @muhammadrizwan-iz8er 3 ปีที่แล้ว

      Failed to load resource: the server responded with a status of 500 (Internal Server Error)
      could u help me resolve this?
      After registration, it goes to login but after login, it shows this error.

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

    Could someone get redirected to Home by manually setting the 'redirect' state to true?

    • @muhammadrizwan-iz8er
      @muhammadrizwan-iz8er 3 ปีที่แล้ว

      Failed to load resource: the server responded with a status of 500 (Internal Server Error)
      could u help me resolve this?
      After registration, it goes to login but after login, it shows this error.

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

    👍

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

    sir make Protect route. Login user can't access Signup page.
    if user already Login in then don't go to login page again.
    and other route protect. If not login don't go home page or other routes
    and make Video store Token in Mongodb Database and delete from there and verify from there. and Token expire date etc.
    and make video Authentication with Facebook and Google In Node Js also.

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

      stop giving orders in such an arrogant way.

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

      @@TheMrianura this is not arrogant I dont know much English show that reason i dont know what meaning in feeling

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

    Source code please 😁

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

      Here it is: github.com/scalablescripts/react-auth

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

      @@ScalableScripts Thanks 👍

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

    You not use jwt cookie for nothing.

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

    Hello, so is it the right way to do authentication? You do it all in the backend and dont need to do anything in the frontend, you just need to ask browser for the cokie am I right. Please anyone answer me 😢

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

    Hi! Thank for your explaination!
    I have issues when I started backend. Could you help me? Thank you!
    Illuminate\Database\QueryException
    SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name does not resolve