Skip to content

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

Closed
@leftluoyi

Description

@leftluoyi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions