Closed ma2kutty closed 6 years ago
I have done like below, is this the right way, since I could not find any documentation in these lines. The below lines are working though.
userPool.storage.sync(function(err, result){
if(err){
//Handle error
} else if(result == "SUCCESS"){
if(userPool.getCurrentUser()) {
//user logged in
//navigate to home
} else {
//new user
//navigate to login
}
}
You are correct.
I see a 'sync' function in 'StorageHelper-rn.js' which stores the necessary credentials in AsyncStorage (provided by react native). How to use this feature?
Current scenario