function storeTokenAndNavigate(response, dispatch) {
  let token = response.user.toJSON().stsTokenManager.accessToken;
  let refreshToken = response.user.toJSON().stsTokenManager.refreshToken;
  let user = JSON.stringify(response.user.toJSON());
  AsyncStorage.setItem("lift-token", token);
  AsyncStorage.setItem("lift-refreshToken", refreshToken);
  AsyncStorage.setItem("lift-user", user);
  dispatch({ type: "signin", payload: token });
}
//Stores the token in the user's device to maintain session.
Stores the token in the user's device to maintain session.
Stores the token in the user ' s device to maintain session .
function storeTokenAndNavigate(response, dispatch) {
  let token = response.user.toJSON().stsTokenManager.accessToken;
  let refreshToken = response.user.toJSON().stsTokenManager.refreshToken;
  let user = JSON.stringify(response.user.toJSON());
  AsyncStorage.setItem("lift-token", token);
  AsyncStorage.setItem("lift-refreshToken", refreshToken);
  AsyncStorage.setItem("lift-user", user);
  dispatch({ type: "signin", payload: token });
}
function storeTokenAndNavigate ( response , dispatch ) { let token = response . user . toJSON ( ) . stsTokenManager . accessToken ; let refreshToken = response . user . toJSON ( ) . stsTokenManager . refreshToken ; let user = JSON . stringify ( response . user . toJSON ( ) ) ; AsyncStorage . setItem ( "lift-token" , token ) ; AsyncStorage . setItem ( "lift-refreshToken" , refreshToken ) ; AsyncStorage . setItem ( "lift-user" , user ) ; dispatch ( { type : "signin" , payload : token } ) ; }
Stores the token in the user's device to maintain session.
Stores the token in the user ' s device to maintain session .