React JWT Authentication

Поділитися
Вставка
  • Опубліковано 15 жов 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!

  • @muhammadrizwan-iz8er
    @muhammadrizwan-iz8er 3 роки тому +6

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

  • @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

  • @suneeltalawar4386
    @suneeltalawar4386 3 роки тому +2

    Your explanation is good but where is the JWT here?

  • @DanielTamayo-wn5lu
    @DanielTamayo-wn5lu Місяць тому

    Very thanks for the tutorial ❤

  • @umerfarooq3121
    @umerfarooq3121 3 роки тому +6

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

  • @mrlectus
    @mrlectus 26 днів тому

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

  • @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 2 роки тому

      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)

  • @dubekiler03c2w4
    @dubekiler03c2w4 Рік тому

    You deserve so much love for this video ur the best

  • @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.............

  • @MrKeepItTrill
    @MrKeepItTrill 2 роки тому +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х Рік тому +1

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

  • @chafiullahshuvo4759
    @chafiullahshuvo4759 2 роки тому +1

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

  • @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

  • @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'

  • @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 11 місяців тому

      facing same issue. did you solve it?

  • @dipenparmar2273
    @dipenparmar2273 3 роки тому +2

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

  • @barhawk7753
    @barhawk7753 3 роки тому +1

    Thank you for this guide sir.

  • @rayon9353
    @rayon9353 3 роки тому

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

  • @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'

  • @ahlanio
    @ahlanio Рік тому

    @ScalableScripts Any idea how to solve SameSite attribute problem?

    • @thehunter1674
      @thehunter1674 11 місяців тому

      facing same issue. did you solve 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.

  • @biishtplease
    @biishtplease 2 роки тому

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

  • @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

  • @sadhakbj
    @sadhakbj 3 роки тому +1

    Well man your videos are awesome.

  • @alekstkalia5940
    @alekstkalia5940 Рік тому

    Best explanation 👍

  • @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

  • @oussamaelhousni5665
    @oussamaelhousni5665 2 роки тому

    thank u bro you're a life saver

  • @bipbipbop2751
    @bipbipbop2751 2 роки тому

    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

  • @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.

  • @wiizzaarrddd
    @wiizzaarrddd 6 місяців тому

    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 😢

  • @friedrichvillegasmurillo9775
    @friedrichvillegasmurillo9775 9 місяців тому

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

  • @ainneo
    @ainneo 2 роки тому

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

  • @matthewrideout426
    @matthewrideout426 2 роки тому

    Thanks man, big help :)

  • @rakibahsan6786
    @rakibahsan6786 7 місяців тому

    not working with next js 14 any other way ?

  • @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.

  • @akashpmani
    @akashpmani Рік тому

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

    • @thehunter1674
      @thehunter1674 11 місяців тому

      facing same issue. did you solve it?

  • @siimtulev1759
    @siimtulev1759 3 роки тому +1

    Internal error 500 if I try to post...

  • @DeepakGupta-pz4fx
    @DeepakGupta-pz4fx 3 роки тому +1

    Please make on video Redux tutorial

  • @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.

  • @mehieddinezeidan8877
    @mehieddinezeidan8877 3 роки тому +4

    It’s not JWT

  • @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: ua-cam.com/play/PLlameCF3cMEuSQb-UCPDcUV_re5uXaOU9.html
      React and Django JWT Authentication: ua-cam.com/play/PLlameCF3cMEtfyO6H7WXUAqoIJO21bDNp.html
      React and NodeJS JWT Authentication: ua-cam.com/play/PLlameCF3cMEtiOUjWPmrrFYyLHLHoYmEO.html
      React and Golang JWT Authentication: ua-cam.com/play/PLlameCF3cMEuXdBAqa4v8CsbjGnpic71H.html
      React and NestJS JWT Authentication: ua-cam.com/play/PLlameCF3cMEuP6lovCY66kIZ4WyNVq1_m.html
      React and Deno JWT Authentication: ua-cam.com/play/PLlameCF3cMEu3qhKzCV66_3O9Ozc0BMt9.html
      React and C# JWT Authentication: ua-cam.com/play/PLlameCF3cMEtY5S-9aVlCobcfDdbmpjPa.html
      React and Kotlin JWT Authentication: ua-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.

  • @hilmialmuhtade8523
    @hilmialmuhtade8523 2 роки тому

    thanks a lot sir

  • @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

  • @dahirmuhammaddahir4435
    @dahirmuhammaddahir4435 3 роки тому

    hi awesome work, please make vuejs 3 jwt authentication video

  • @rangabharath4253
    @rangabharath4253 3 роки тому +1

    awesome

  • @asadmahmood8605
    @asadmahmood8605 2 роки тому

    👍

  • @rohitkharche7562
    @rohitkharche7562 3 роки тому

    Source code please 😁

  • @omarcuevassilva5500
    @omarcuevassilva5500 2 роки тому

    You not use jwt cookie for nothing.

  • @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!! ???

  • @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