Skip to content

Parse.User.logOut() does not clean currentUser in LocalStorage #493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leftluoyi opened this issue Oct 23, 2017 · 3 comments
Closed

Parse.User.logOut() does not clean currentUser in LocalStorage #493

leftluoyi opened this issue Oct 23, 2017 · 3 comments

Comments

@leftluoyi
Copy link

I am using Parse javascript sdk. I can signup and login successfully. However, when logout using the following code

const logoutHandler = ({ key }) => {
    if(key == "logout") {
      Parse.User.logOut().then(() => {
          var currentUser = Parse.User.current();
          console.log(currentUser)
          window.location = "/"
          }
        )
      });
    }
  }

According to the documentation here, after the user successfully logout, the Parse.User.current() should be null. However, it shows that currentUser is not null. I checked the LocalStorage, Parse/test/currentUser and Parse/test/installationId are still there. And according to the code of Parse-SDK-JS, when user logout, the currentUser is not set to be null.

@leftluoyi leftluoyi changed the title logOut() does not clean currentUser in LocalStorage Parse.User.logOut() does not clean currentUser in LocalStorage Oct 23, 2017
@elvis7449
Copy link

Same problem. I've tried wid different releases. Still did not succeed. The session class gets crowded since the user logout did not destroy the session. Any idea?

@ma0ho
Copy link

ma0ho commented Nov 21, 2018

For me it works now..

@stale
Copy link

stale bot commented Feb 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

4 participants