Expo Router Authentication Flow Using Expo Router v2 and Expo SDK 49

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024

Комментарии • 43

  • @AaronSaundersCI
    @AaronSaundersCI  Год назад +2

    If you enjoyed the content you can help support the channel, consider hitting the THANK YOU button

  • @waterstoff
    @waterstoff Год назад +1

    Thank you! Very clear video. Managed to fix my issue with the initial navigation. Docs did indeed not state to await the navigation to ready before navigating. Works fine now :)

  • @LadyMariYo
    @LadyMariYo Год назад +3

    Very useful and saved me time. Thank you!

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      Glad you enjoyed it, would appreciate it if you consider liking and subscribing to channel

  • @小杜-p7v
    @小杜-p7v Год назад +1

    Thank you for this, very useful.

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      Glad it was helpful!

    • @小杜-p7v
      @小杜-p7v Год назад

      Was banging my head against the wall for a bit trying to get it to logout and reload the page. Finally got that working though.
      router.replace("/"); on logout, router.load("/"); on login, and some logic in the root _layout to say if auth'd load stack X, or stack Y, and it finally works.
      Days of ditzing about though.

  • @NunoCostapt
    @NunoCostapt Год назад +1

    Thanks for sharing! Also this expo version ships with last version of react native👌

  • @codewithmufaddal9076
    @codewithmufaddal9076 Год назад +3

    i follow your code , and structure but some how every time i open app the first screen is "/" route and then redirect to /signIn route , what am i doing wrong
    i check in app/_layout
    if (!authInitialized && !user) return null -- also give him a falsy and true value to check the result and its giving blank page if condition evaluates to true

    • @codewithmufaddal9076
      @codewithmufaddal9076 Год назад +3

      also i clone your code and check init i got same result why is this happening , and if i go back from signin page it should exit the app instead redirecting me back to signIn page

    • @codewithmufaddal9076
      @codewithmufaddal9076 Год назад +3

      In Debugging i checked that in first log i am getting ["(tabs)"]
      in second log i am getting ["(auth)", "/signIn"]
      but dont know how to resolve this problem

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      Please post some code so I can see what is missing

    • @Sami-jb8cx
      @Sami-jb8cx Год назад +1

      same problem here!!

    • @Sami-jb8cx
      @Sami-jb8cx Год назад

      @@AaronSaundersCI same problem with ur project. test phone has android 10.

  • @brainxs98
    @brainxs98 Год назад +1

    Awesome Video!!! Thank you!
    Do happen to know how to make a Tab Button that opens a Modal?

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      Thanks and glad u found it helpful, I always appreciate a like and subscribe

  • @binews9938
    @binews9938 9 месяцев назад

    where should we put theauth routes icant see them right there

  • @z1haze
    @z1haze Год назад +1

    its a bummer that this video is only a couple of months old, and the documentation which you followed for this video is completely different now. This stuff is supposed to be in release status, why are they changing things so significantly like this?

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад +1

      Yes it is, I will try and update the video in the next week or so

  • @milla9559
    @milla9559 7 месяцев назад +1

    it was better if change the documentation to dark mood

  • @kpopcat_official
    @kpopcat_official 9 месяцев назад

    in every route, when we use the user data from the hook, it still could be undefined in typescript even its protected which is quite annoying, do you have a solution for it?

    • @AaronSaundersCI
      @AaronSaundersCI  9 месяцев назад

      i dont understand you question

    • @kpopcat_official
      @kpopcat_official 9 месяцев назад

      ​@@AaronSaundersCI nvm, I think I have the answer Thanks

    • @robertonesta1218
      @robertonesta1218 8 месяцев назад

      I think I got your same problem. How did you solve it, dude?@@kpopcat_official

  • @wusswuzz5818
    @wusswuzz5818 Год назад

    Great video! I have being trying to use Suspense with expo-router/react navigation router but so far have not been able to make it work. Have you successfully done it?

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      Glad you enjoyed the video would appreciate a like or subscribe 🙏🏾 as for suspense, I have never tried, maybe I will investigate that in a future video.

  • @NizarGHRIBI
    @NizarGHRIBI 4 месяца назад

    hi

  • @AaronSaundersCI
    @AaronSaundersCI  Год назад +7

    - *New Video* - ruclips.net/video/Ud_GWxu1_Xg/видео.html
    - *Blog Post* - dev.to/aaronksaunders/expo-router-v2-authentication-flow-with-appwrite-jee
    - *Source Code* - github.com/aaronksaunders/expo-router-v2-authflow-appwrite
    - *Newsletter* - fiwic.ck.page/profile

  • @hookerhillstudios
    @hookerhillstudios Год назад

    is it possible to start the tabs template with javascript instead of typescript?

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      I it looks like it defaults to typescript

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      Starting a new series of setting up expo apps with expo router manually with no typescript. First one is here Expo Router From The Docs - Stack Navigator
      ruclips.net/video/wBjy08dxL8I/видео.html - tabs is next

  • @iaintcatchingnoell
    @iaintcatchingnoell Год назад +3

    Thank you for explaining this in a really nice way!

    • @iaintcatchingnoell
      @iaintcatchingnoell Год назад +1

      Also just wanted to tell you that adding the source code in the comments really helps me out.

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      Glad it was helpful!

  • @griseld
    @griseld 5 месяцев назад

    The homepage gets shown for a brief moment after the splashScreen and i can't seem to find a way to go to the login page directly. Any idea?

  • @name-or4rx
    @name-or4rx Год назад

    why there is no index.tsx file? in the app dir?

    • @name-or4rx
      @name-or4rx Год назад

      i have (auth)/sign-in and (tabs)/index also have index.tsx in the app dir. index just renders Slot, and in the useEffect of root layout i do redirect based on session presense either to sign-in or to tabs. And due to my index.tsx jsut rendering slot im getting an error `Navigator at "/index" has no children. ` How can I resolve this?

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      @@name-or4rx i suspect the navigationRootState is not completed thats why you cannot find any paths. I have noting in index.tsx since my rootLayout is doing the stack

    • @name-or4rx
      @name-or4rx Год назад

      @@AaronSaundersCI I see thanks Aaron. Not sure how to solve it then, sawing your comments on expo-router github issue Im actually checking for navigation state with `rootNavigation?.addListener('state', (event) => {
      setNavigationReady(true)
      })`

    • @AaronSaundersCI
      @AaronSaundersCI  Год назад

      @@name-or4rx happy to take a look at a sample project if you want to show me something