How to keep the user logged in | React Native Login System #6

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

КОМЕНТАРІ • 61

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

    Hey there! thanks for watching. Please leave a LIKE and use the Timestamps below to go through the video if you want.
    00:00 Intro & Preview
    00:21 Getting Started
    02:40 Monitoring App Readiness
    04:18 Checking Async Storage
    06:43 Introducing Context API
    11:26 Most Important Part!
    17:49 Modifying Signup
    19:12 New Problem
    21:17 Handling Logout
    23:00 Testing the App
    23:50 Summary & Conclusion

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

    I built this project fully and really enjoyed it. If you end up continuing this series, it would be really awesome to learn how to setup bottom tab navigation alongside the stack navigation on pages once logged in from the welcome page forward

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

    I'm so happy that I found your channel. The clearest explanation. You did a great job. Thank you so much. This series of videos have helped me a lot

  • @astanphaeus
    @astanphaeus 3 роки тому +3

    This tutorial was so clear and helpful, very goob job! I really like your style of explaining and everything seems so clean and organised, it was actually the only tutorial that helped me with every step! Thank you a lot! Keep up the good work :)

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

      That's good to know.
      Thanks a lot for the feedback 🤝

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

      @@ToThePointCode hello please I followed your tutorial and tried adding bottomtabnavigation to my own project, but it seems to be conflicting with the rootstack we did earlier...what could be done?

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

      I'm not quite sure about your app flow but if you want the bottom tabs to be available after signin, you have to embed the bottom tabs with its screens in the stack navigator.

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

      @@ToThePointCode alright thank you so much

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

      You're welcome.

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

    Very clear explanation. As in, each 'dot' was thoroughly explained. Thank you. And besides, I like the name of the channel

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

    The AsyncStorage should not be imported as
    import {AsyncStorage} from '@react-native-community/async-storage';
    But actually as
    import AsyncStorage from '@react-native-community/async-storage';
    Wonderful tutorial, explained perfectly. Thank You

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

    You're so awesome! Please keep up with the great work like these. Thank you so much!

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

    can you continue this series brother? This is amazing and easy to learn. And can you make a shopping cart and function of it as well.not just the UI of cart, but with functions. :)

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

    thanks for the tutorial ,
    and how do you manage the user's token ? especially when it has expired because they will be some request that would obviously need the users token

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

    Very helpful tutorial, thank you sir and keep going...

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

    Hi , super Tuto ! Wouldn't it be better to store user information in the secureStore ? thank's

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

    App loading is depriciated as at now so please i need help am trying to use activity indicator

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

    Good but, you shouldn't use AsyncStorage to store credentials because it isn't encrypted. Better to use something like `react-native-keychain` as noted in the React Native documentation.

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

    thanks 👍👍

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

    Wonderful Demonstration. But I am having some trouble storing data to localhost. On the login page when I push "credentials" in "setStoredCredentials", it is showing me an error stating "Expected 0 arguments, but got 1.". Can you please help me with that?

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

      Have you fixed it yet?
      If not, you can check the definition of the setStoredCredentials function again. It looks like you are missing the list of expected parameters.

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

      @@ToThePointCode Not yet... I removed the parameter that were passed in credentialContext file.

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

    Hi, I keep getting "TypeError: render is not a function. (In 'render(newValue)', 'render' is an instance of Object)" when I try to run it. How do I resolve this?

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

    in the login.js when i log in i receive the next error: setStoredCredentials is not a function. (In 'setStoredCredentials(credentials)', 'setStoredCredentials' is undefined)

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

      It looks like the value of the function isn't passed properly. You have to check the code.
      How far with it?

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

    Async storage is saving login data only for 1-2 days than user needs to relogin. Can someone help to make this period for at least a week. Did someone have this issue?

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

      Async-storage will store the data until you manually delete it.
      For current info: docs.expo.dev/versions/latest/sdk/async-storage/

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

    Hi to the point code, my login page states sign in successful but it does not redirect to the home screen and no error is displayed in the console. Any suggestions you can render??

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

      The redirection should happen automatically once you the context setup right and the conditions over here 11:27.
      You can try logging your values to the console at each point to see if they aren't undefined.

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

      @@ToThePointCode oh Thanks man, forgot about the root stack. Appreciated!!

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

      You're welcome man 👊🏽✌️

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

    After closing the app and opening it again it goes back again to the login page..can you Please help

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

      Well, that shouldn't be the case if you did everything right.
      End the metro server and restart the application.

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

    This is not a right way to do this, in every app you have to be 100% sure that every thing will not go out of plan. In this situation what if the user has changed his password or anything from his credentials from another device and is logged in this device is that right ???

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

    is anyone having white screen problem ?

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

      🤔

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

      ​@@ToThePointCode Also having this problem ive traced it to when i am wrapping the rootstack screens in the {storedCredentials ? () : ()} in RootStack.js. Before this everything works fine. just cant understand why this would not return a useable stack or throw an error will let you know if i find a fix

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

      me!!

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

      @@ToThePointCode I'm having that right now :(

  • @ນາງຫມູ່ຫລານ
    @ນາງຫມູ່ຫລານ 3 роки тому +2

    How to add user to firebase sir?

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

    Hey, my logout button is not working!!! Can you please help?

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

      What does it say, any error?
      Also are you done watching the video please?

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

      Check if OnPress= ()=>{} u did or not namrita?

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

    My biggest problem with your videos is you code for too long without running the code, which leads to people following along having various errors. Then you don't know what you broke because you made us edit like 4-5 files all at once.
    Please run your code more often thank you

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

    excellent, what is your email?