Stay Logged in With AsyncStorage & Logout - React Native

Поделиться
HTML-код
  • Опубликовано: 3 дек 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

  • @SsaliJonathan
    @SsaliJonathan 3 года назад

    Nice video man. Very helpful.

    • @fsniraj
      @fsniraj  3 года назад

      Glad you liked it!

  • @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.

  • @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. 😉

  • @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 ruclips.net/p/PLaAoUJDWH9WrPXMOkqHHsPHxbhvRDqryM

  • @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

  • @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 3 года назад

      @@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  3 года назад

      ​@@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 3 года назад

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

    • @fsniraj
      @fsniraj  3 года назад

      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.