Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

ParseReact.currentUser lost on simulator refresh #149

Open
jasecoop opened this issue Dec 10, 2015 · 1 comment
Open

ParseReact.currentUser lost on simulator refresh #149

jasecoop opened this issue Dec 10, 2015 · 1 comment

Comments

@jasecoop
Copy link

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

@jadsonlourenco
Copy link

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) {...}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants