Mimic open, close and re launching of app within expo


#1

Hi

I’m integrated aws-amplify with with react-native app built using expo and CRNA.

I am trying to implement a logic where when I launch the app, I check if an existing user session Auth.currentAuthenticatedUser() exists, if so then skip the Login page and directly load the main page. If it doesnt then go to Login page.

Normally in real world, we

  1. launch an app
  2. Login
  3. Do stuff
  4. close app
  5. do stuff with other apps
  6. relaunch app

At step6, we will not be forced to login again as the session is remebered.

Now how do I mimic this for an app running within Expo. I tried

  • rebuild
  • close running expo app and relaunching expo and the launching the app under expo

In both scenarios, it always takes me to step 1 (i.e I have launched the app for the first time).

How do I test the expected scenario?


closed #2

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.