Is it possible to remove the object storing automatically in localStorage upon user logged in? Since this is in their documentation.
Parse.User.logOut()
does this automatically but I suppose you are looking for a manuel way to do it.
Information of current user stores in localStorage
as "Parse/APP_ID/currentUser"
APP_ID
is the key you use when you initialize your Parse SDK
Parse.initialize("APP_ID", "JAVASCRIPT_KEY");
You can use removeItem()
method in localStorage.
removeItem("Parse/APP_ID/currentUser")
If you want to do it with every login
Parse.User.logIn("myname", "mypass").then(user=>{
localStorage.removeItem("Parse/APP_ID/currentUser");
})