React Router Tutorial - 15 - Authentication and Protected Routes

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 193

  • @deiwman4604
    @deiwman4604 11 місяців тому +2

    You made this whole section so simple to understand and to follow. I bought a course on udemy and the teaching way of the teacher it's not even close to yours. Thank you a lot!

  • @kumarsaroj18
    @kumarsaroj18 2 роки тому +10

    I am happy to share that I finished this series in one whole day (of course, I did write code side by side).
    Although, I am still clueless on few router related things used in my project, but this is undoubtedly a good tutorial)

  • @bassam.2023
    @bassam.2023 2 роки тому +27

    There are so many tutorials that I've started and never finished. However, I always complete Vishwas' tutorials. He stays on point!
    Tutorial Grand Master right here!
    Thank you!!!!😁

  • @BruceWayne-kw6xm
    @BruceWayne-kw6xm Рік тому +1

    This Channel is a Gold Mine.. i have learnt node , next js , react from it and every course was awesome

  • @masvimydeen249
    @masvimydeen249 2 роки тому +5

    You are an awesome instructor. Breaking things simpler to understand is your real magic. Lovely tone, frequency and consistent voice delivery is also a reason, things the you explained in your video are getting easily registered. Keep rocking in this space.

  • @dhruv.pandey93
    @dhruv.pandey93 2 роки тому +12

    The most informative series on React Router Dom and that too latest version v6. Covers minor but important details like useLocation, and useSearchParams. Great playlist as expected!!

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

    Couldn't ask for a better tutorial. You are a GEM. Each aspect is crisp and clear. Even a paid course is no match for this. Thank you very much. Looking forward to each of the tutorial series.

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

    Thank you Sir Vishwas, i coded along with you and found it really easy to grasp the basic concepts of React Router V6 whose documentation is not quite understandable. Wish you health and prosperity.

  • @rishabhsharma6084
    @rishabhsharma6084 3 роки тому +17

    what a coincidence.. I was implementing protected routing in my new project🤘🤘😁

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

    didnt understand a lot, but anyways so far i learned so much with your help, just commented this because i wanted you not to stop anytime from this kind of tutorials, but i would like to see tutorial about tutorial hell from you

  • @chidyommy284
    @chidyommy284 5 місяців тому

    Great playlist bro, it's the only tutorial on UA-cam about React router that is explained in great details

  • @Raul-si7bn
    @Raul-si7bn 2 роки тому +2

    Thanks!

  • @mehdihosseinpour3351
    @mehdihosseinpour3351 2 роки тому +6

    Great. It is the best video I've ever seen for protected route. I think you can improve it with adding multi role authorization as well as JWT authentication to it.

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

    Thank you so much for explaining everything so clearly and in details. I really do not know how to express my gratitude. I have watched a lot of your tutorials and I found them really helpful. I wish you the best.

  • @iamnirupampal
    @iamnirupampal 4 місяці тому

    Because of you i learned the react-router-dom thank you for your efforts

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

    Thanks Viswas. Another great series in React Ecosystem. Exercises are small enough to focus more on the Router aspects. Well explained. Great Work 👏

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

    Best teacher! Simple examples! Best Tutorials!

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

    It was 🤯. I explored different dimensions of react router dom.
    React is really powerful!!!

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

    Thanks a lot for whole series.
    You explained it really well in easy to understand language with appropriate example.
    Request to post such series in future.

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

    Watched the complete course in one day...thanx buddy!☺

  • @saurabrakshit405
    @saurabrakshit405 2 роки тому +2

    Yes you have not disappointed any one ! Very well structured tutorial for React Router Library.
    But I want to mention I would be pleased if you have taught the Authenticated Routing with Username & Password Authentication.

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

      It's very similar to this, a bit complex though but the flow is same

    • @VivekThakur-sf9pr
      @VivekThakur-sf9pr 2 роки тому

      For demo purpose we can set the user and password and during login we can check with if condition that whether its correct or not, if its correct match than proceed to navigate where u can.

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

    Wow I just finished watching the 15 videos and is this really is so good

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

    Finally a proper and right video. Thank you sir.

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

    Thank you very much sir for wonder React Router Tutorial. The best Complete React js Tutorial UA-cam channel

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

    Thank you for explaining so elaborately.. this will definitely help me with my interviews

  • @Noone-lh5rv
    @Noone-lh5rv Рік тому

    finally, someone teach me about React properly

  • @Raul-si7bn
    @Raul-si7bn 2 роки тому +1

    this series is just a (huge) hidden gem. No others series I've seen are this through, and with very good examples. That about React Router V6, but also, the style in general , the easy approach...i've seen many tutorials, since I am always looking for good and updated examples, and I can safely say, this is one of the best I've come across ..
    Keep up the good work!
    Implement Context , explain Redux (with toolkit maybe), firebase, firestore ...then MERN ..waiting for all of those! :D

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

    I was able to get something that worked using this technique with a Redux store. Thanks

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

    What a super series of videos - helped me enormously with a routing problem I had. Thanks for posting.

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

    hey Vishawas.. Thanks for these videos. Really appreciable work... you are best.

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

    Thank you so much for your effort sir....i really gained more knowledge on and about ReactJs and now i can fearless develop the
    project on it....Once again ....Thank you So Much....

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

    Wow thanks so much Vishwas your content are always easy to understand and rich 🙏

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

    Really helpful tutorial. bole to ek dam Jhakkas 😎

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

    this video is so awesome, loved the fact that you used the context API, thank you.

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

    Ohh Buddy... Timing completed previous videos just now... ❤❤❤❤❤

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

    Amazing tutorial series, as always. Thank you, Vishwas

  • @balloobhaiya
    @balloobhaiya Рік тому +1

    i highly recommend to watch this

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

    thank you so much. your turorials are most easy to understand

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

    No hate to hitesh, but your tutorials are way more great

  • @muhammadzeeshan07
    @muhammadzeeshan07 5 місяців тому

    A very important and well explained video Thanks bro

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

    Thank you for giving such a quality content for free

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

    Thanks Viswas, really great content!

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

    Powerful and yet so easy to understand. Thank you a lot.

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

    Thank you for this video! Congratulations my friend!

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

    So from my understanding, navigate() should only be called inside a trigger action or inside a useEffect. Otherwise you get an error on the console telling you that you need to call navigate() inside React.useEffect().
    However, I didn’t get this error when I used .
    So I guess that is the only difference between using navigate(‘/login’); over .

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

    Excellent series. Thank you!

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

    Thanks for these videos! That were simple and perfect!

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

    Amazing Tutorials. All the videos are Gem. Thank You

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

    It was an awesome playlist! Thank you!

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

    thank you dear vishwas ...you are an awesome dude

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

    proper and right way to understood

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

    bro you are a very good developer

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

    Hi Vishwas,you videos are awesome you are doing a great job we also want your tutorials on webpack,gulp and other similar tools which help to avoid repetitive task in development and production. Thank you .

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

    Dude i love this man accent. If i was a girl bro, i swear...

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

    The best teacher, thank you!

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

    Great work Vishwas

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

    Till now the best one. Plz maintain this

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

    Thank you so much for this wonderful tutorial. It helps me a lot.

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

    You have not disappointed me!

  • @gopalakrishnanshanmugam7236

    Great Sir Thank you. Very helpfull tutorial

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

    Guru ji 🙏🙏🙏 awesome content 😍😍

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

    Thank you for this lesson! liked & subscribed!

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

    Thank you so much, very informative videos

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

    bro, thanks! you explained it clear

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

    Thank you so much for these valuable videos!

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

    The last test in React Router Tutorial - 15 - Authentication and Protected Routes time 17:20 doesn't work for me. Using React 18.2.0 ; react-dom 18.2.0 ; react-router 6.22.0
    It's the second series of videos from you I am doing, they are simple, easy to follow and code side by side I learn. This is why I raise this so if I am doind something worng or you need to update something in the video (as of February 15th, 2024 it's marked from 2 years ago).

  • @jasono873
    @jasono873 Рік тому +1

    Big big Thank you 🙏

  • @cocoon1538
    @cocoon1538 Рік тому +2

    I don't know if this is handled in a later tutorial, but the auth logic provided in this tutorial is not 100% secure by itself as anyone can modify "user" state in their browser to access protected routes.
    I understand that it is React (front-end) tutorial, but just a heads up that you might want to add an extra layer of security if using this in production.

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

    Thank you very much for this tutorial, was very helpful !

  • @youssef-attai
    @youssef-attai Рік тому

    Thank you so much, that was really helpful.

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

    Thank for this playlist! 🙌 very helpfull !

  • @macdonaldmanana1358
    @macdonaldmanana1358 5 місяців тому

    Amazing work, thanks!

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

    thank you very much for this series

  • @amiiko232
    @amiiko232 10 місяців тому

    i love you bro you saved my life

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

    Thanks Viswas!

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

    {replace:true} is not working ?
    did anyone faced this issue ?

  • @jerickgeronimo282
    @jerickgeronimo282 Рік тому +2

    do u have a github repo for this specific proj?

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

    Hi sir,
    On reloading the protected route page ( let's say profile) the browser redirecting to login page with setting user as null (checked user state in browser -> inspect -> components -> authProvider -> state) but I want to stay in profile page even after reloading. If i use localStorage/cookie and setUser initially on useState, then anyone can set local storage/cookie user value and can have access to profile page.
    Please help me how to have completely protected route with stay on profile page even after click on refresh/reloading page🙏🏻.
    (Thank you for your excellent teaching)

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

    thanks for the tutorial, you are amazing!

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

    Thank you for this tutorial.

  • @shineLouisShine
    @shineLouisShine Рік тому +1

    Awesome. Thanks a lot.
    13:!3 - It's a shame that you aren't really explaining why this time you choose the Navigate component
    Instead of the useNavigate hook like you did in all the other places in the code.
    Or - why did you prefer to use the hook in all the other places and not the component.
    You had some really good opportunities to explain...
    It leaves me wondering... when should we use which.

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

    Thank you very much! Very helpful!

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

    How to use a useContext hooks in non react functional please explain 5:49

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

    Let say we have params route like /product/:id how to protect this if product id is not present it will return empty structure.we have to throw error in this case

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

    amazing tutorial man

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

    thanks for this series

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

    Explanation was clear and helpfull

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

    Thanks a ton brother!!💯💯💯

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

    I found what is your Next React Playlist 😁😁?
    I really want React ***** tutorial series.
    I thought You won't do that before knowing Your next playlist.

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

    Thank you
    Is there a repo with this code at the end of the course?
    The one on gihub only the first lesson

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

    thanks for the course dear

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

    Why are you using navigate() in one place and component in the other ? What is the difference?

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

    The "user" context variable values after "logging in" is null (at 00:11:48 point). I checked everything. Don't know why it's not being passed to the Profile page.
    Figured it out! I My app does not have a navbar. I was appending "/profile" to the root URL and I read in a post after some research that doing it this ways refreshes the app and the context is cleared. Thank you Vishwas for your great videos.

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

    Bahut shandar, gajab.

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

    What is someone navigates to the login page via url in the address-bar ? Does replace in the navigation fix that usecase ?

  • @geek_24
    @geek_24 5 місяців тому

    If anyone wondering then let me tell you this is not persistent login. A refresh will log you out!

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

    Hello Vishwas why have you not used useNavigate hook in RequireAuth.js

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

    Thank you for there great videos.

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

    Line 25:23: 'AuthContext' is not defined

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

    Hey Anyone Here the children prop refers to the component we are going to wrap with the authProvider right?