React protected routes in 4 minutes

Поділитися
Вставка

КОМЕНТАРІ • 56

  • @bones1343
    @bones1343 7 місяців тому +5

    What a coincidence that this pops up as I was working on this with Appwrite today 😄

    • @Appwrite
      @Appwrite  7 місяців тому +1

      Perfect timing 😁

  • @himanshuprasad5461
    @himanshuprasad5461 3 місяці тому +3

    I don't have any words I just wanna appreciate you. Just keep spreading your valuable knowledge

  • @davidofug
    @davidofug 28 днів тому

    Insightful tutorial. Something developers might need to test is the hitting the reload button when the user is set to true. To ensure they remain on the current page.

  • @sharonraj801
    @sharonraj801 4 місяці тому +2

    Thank You bro, less duration with more details

  • @berkaysenoglu1784
    @berkaysenoglu1784 6 місяців тому +3

    Really fast and efficient , thanks!

  • @JieclarkDeveloper
    @JieclarkDeveloper 11 днів тому

    the best tutorial I fix my problem on protected route thanks sir , I hope you make a video about supabase authentication

  • @HijabiCoder
    @HijabiCoder 7 місяців тому +2

    Finally the mouse let you do your thing? 😅
    Nice technique for protecting routes, I don't think I realised that you could nest routes within a . Thought it had to be only 🤔

    • @Appwrite
      @Appwrite  7 місяців тому +3

      We decided to set a schedule for when he's allowed to make noise. Deal was a win win. 😁
      And yea, the Routes nesting is a change made in react router V6 - Dennis Ivy

  • @solongdygaming4729
    @solongdygaming4729 4 місяці тому +2

    I'm so lucky to found your video ❤

  • @shubhamdas6519
    @shubhamdas6519 6 місяців тому +2

    easy fast efficient, thanks a lot sir

  • @heech6941
    @heech6941 2 місяці тому +1

    Hello any ideas why when I did this and user clicked on protected routes even though they are not logged in, a blank white page shows up for milliseconds and then redirects me to the login page

  • @faizan5738
    @faizan5738 21 день тому

    Thank U sooooo much GOD Bless You

  • @CarlosDuque-e3j
    @CarlosDuque-e3j 3 місяці тому +3

    What vs code theme is that? :O

  • @alvasBV
    @alvasBV 6 днів тому

    Maybe a bad question but if there is any sensitive data, isn’t the page loaded by the browser anyway ? So he could just snif the traffic and get the page even tho he is not auth ?

  • @ZahidHussain-hj2dk
    @ZahidHussain-hj2dk 4 місяці тому

    beautifully explained

    • @Appwrite
      @Appwrite  3 місяці тому

      Glad you liked it :) - Dennis Ivy

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

    amazing, thank you very much

  • @modsiwenterprisesmetalfabr9554
    @modsiwenterprisesmetalfabr9554 18 днів тому

    Why am I getting Uncaught Error: You cannot render a inside another . You should never have more than one in your app.

    • @Appwrite
      @Appwrite  18 днів тому

      Because you put *, but you need, but you need , remove the "R" in the nested Route. -Dennis Ivy

  • @metadope9407
    @metadope9407 6 місяців тому +1

    Pretty accurate 👍🏻

  • @haophu3121
    @haophu3121 23 дні тому

    cam on thay Hoang

  • @samuelkamau1550
    @samuelkamau1550 3 місяці тому

    nice tutorial, great voice👍

  • @solongdygaming4729
    @solongdygaming4729 4 місяці тому +1

    Thanks ❤

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

    great video, but, how do i protect auth routes?

  • @Devwithaayu
    @Devwithaayu Місяць тому

    thank you show much

    • @Appwrite
      @Appwrite  18 днів тому

      My pleasure! - Dennis Ivy

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

    Is there any issue with the appwrite 14.x version its showing error in createEmailPasswordSession()

    • @Appwrite
      @Appwrite  7 місяців тому +1

      You seem to be using an SDK version that is compatible with Appwrite 1.5.x and not 1.4.x. You probably need to use one version before what you're currently using.

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

    In protecting routes i can use loaders?

    • @Appwrite
      @Appwrite  3 місяці тому +1

      From what I understand, loaders can only be used if you create your routes with "createBrowserRouter", but either way, this would work the same.

  • @0raffay
    @0raffay 3 місяці тому

    What is that vs code theme ?

    • @Appwrite
      @Appwrite  3 місяці тому +1

      Halcyon Theme

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

    I used appwrite in my flutter app...it was smooth experience with only a problem i am having now about how to make database relationships ...
    Any help is appreciated...thank you

  • @HarishKurupnarayana
    @HarishKurupnarayana 3 місяці тому

    What if I access the login page after the user is set to true?

    • @Appwrite
      @Appwrite  3 місяці тому +2

      You would wrap the login page with a parent that doesn't render the page until this check is made. i.e. context api would do this. - Dennis Ivy

    • @HarishKurupnarayana
      @HarishKurupnarayana 3 місяці тому

      @@Appwrite thanks for the reply, will try

    • @Ad9911io
      @Ad9911io 2 місяці тому

      What if it takes 20 seconds to fetch the user?

    • @HarishKurupnarayana
      @HarishKurupnarayana 2 місяці тому +1

      @@Ad9911io show a loader

  • @Pepe-tp5mk
    @Pepe-tp5mk 7 місяців тому +1

    Best video but Appwrtite query don't work

    • @Appwrite
      @Appwrite  7 місяців тому +1

      Which one?

    • @Pepe-tp5mk
      @Pepe-tp5mk 7 місяців тому

      ​@@Appwriteabout listdocument

    • @Pepe-tp5mk
      @Pepe-tp5mk 7 місяців тому +1

      @@Appwrite about ListDocument Query

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

    pretty cool

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

    YOu are Awesome

  • @mohaymenul-islam
    @mohaymenul-islam 2 місяці тому

    Great

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

    thanksssssssssssssssssssssss

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

    why do I get an error like this? SyntaxError: Unexpected token '

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

      I think there is no error in my syntax
      import { Navigate, Outlet } from "react-router-dom";
      const PrivateRoutes = () => {
      const { isLogin } = useAuth();
      return isLogin ? : ;
      };
      export default PrivateRoutes;

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

      Looks like you just had an extra “