ParseReact icon indicating copy to clipboard operation
ParseReact copied to clipboard

ParseReact.currentUser lost on simulator refresh

Open jasecoop opened this issue 9 years ago • 1 comments

Hi

I'm able to login/signup and am observing ParseReact.currentUser and everything is working fine.

Though when I refresh on the iOS simulator this.data.user returns false and I have to signup/login again.

Am I right in thinking this is incorrect, and the session should still be there and the user still logged in?

Why would this not be saving?

Thanks

Jase

jasecoop avatar Dec 10 '15 17:12 jasecoop

Hi Jase, here is my code and works fine, I can refresh, restart, the session will be persistent.

observe(props, state) {
  return {
    user: ParseReact.currentUser,
  };
}

// Then I can use
let User = this.data.user;
if (User) {...}

jadsonlourenco avatar Dec 11 '15 11:12 jadsonlourenco