Stay Logged in With AsyncStorage & Logout - React Native

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 26

  • @roshankurikkal9985
    @roshankurikkal9985 3 роки тому +5

    Please update this code into your github project file

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

    I guess, you have not updated github repository after final update of project folder

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

    Thanks a lot! This helped a great deal. I think it would be better to set those states for logout in the context rather than in the logout function on the button. That way, all changes stay in one place. It's easier to debug in future.

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

      Yes, there are a lot of ways to handle the same thing but sometimes to make things short and not complicated for beginners we have to take shortcuts as well. BTW nice suggestion.

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

    Nice video man. Very helpful.

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

      Glad you liked it!

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

    Can you share codes repository link of this video.... Please 🙏

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

    This code is missing please update?

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

    Do you have the repo for that project? or the authentication full setup?

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

      Secret information. You just need to do is look into the Description Box. 😉

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

    Hi bro , In sign up , i get a succesful response , and redirected to home screen, but unable to login with email, even though I'm getting all the data , Can u please help me sort it out ?

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

      DM the screen shot of your code @ndpniraj

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

    Great tutorial. But after 7:13 it's not completely clear what is going on. You added some new files. It would be better if you tell a little bit about this files and what is going on there. But thanks. Will try to figure out how can I implement this into my project

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

      Brother it's not a single video it's a series so you need to watch previous videos to find about the other files ua-cam.com/play/PLaAoUJDWH9WrPXMOkqHHsPHxbhvRDqryM.html

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

    thank you so much! :)

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

    Hi
    Please help me, I am getting this error
    ReferenceError: useLogin is not defined

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

      Please check you are connecting the Context API correctly.

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

      @@fsniraj Thank you for your reply.
      I was not adding the context,but after adding it, I am getting type of undefined object error or useLogin in main navigator,
      So it is giving me the error on const {isLoggedIn} = useLogin();

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

      ​@@taranwadhwa8578 useLogin is a costum hook and to use it you need to wrape your App component inside AuthProvider and it a context which we made in the previous videos. So check that out first and your problem will be fixed. There are 29 videos in this series and I don't know the exact video where I created the context sorry for that.

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

    Hey how do we upload this app onto the play store so other people can use it

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

      For that you have to create Play Console account and only then you can submit your app to play store after the verification your app will be published. Note: it's not free you need to pay $25 to create an account.

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

      @@fsniraj thanks so much

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

    You're not going to get momentum if you hide code.

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

      Sorry but I didn't get what you mean?

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

    hello, I tried to follow your video but when I close the app and open it again it opens on the login screen, it does not keep the user logged in it simply opens on the login screen, I HAVE ERROR, U CAN HELP ME?

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

      There can be multiple reasons for this. But if you have the correct method validating your auth token inside your backend, if you are sending correctly the auth token from your app and if you are correctly storing the auth token inside your Async Storage then it should work as you intended.