[ISSUE]: Moralis.User.logOut does not clear data

Data in question that does not get reseted and cleared are the attributes from useMoralis(). account, user, isAuthenticated are still the same even after the Moralis.User.logOut() is called.

Even though Moralis.User.current() returns correct data for user at least.

Is that by design?

Of course on a full refresh of the page, the attributes in question are set to their initial value.

Are you awaiting the logOut() and then logging after? Same with awaiting current().

Yes, I am logging on every route change and the data is still there. Also I am still able to do all the requests on Moralis (getNFTs,…).

Found the solution. When using useMoralis react function, there is a logout function there as well. Both functions Moralis.User.logOut() and logout() have to be called to clear the data of useMoralis attributes.