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
- launch an app
- Login
- Do stuff
- close app
- do stuff with other apps
- 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?