unity-web3-game-kit
unity-web3-game-kit copied to clipboard
Can't update MoralisUser fields after few seconds
After logging in via WalletConnect, I can change my MoralisUser's instance information without any problem.
However I can't do it anymore after a few seconds, I get an error MoralisSaveException: {"code":206,"error":"Insufficient auth."}.
Example code :
MoralisUser user = await Moralis.GetUserAsync();
user.username = "Test";
await user.SaveAsync();
Debug.Log("Updated user info");
I seem to be missing an essential step? Is there a token that expires after a few seconds?
There was a security update on the backend that now re-validates the signature everytime it is posted. I will need to add a patch for this in the Unity SDK.
For now to get past the issue, before you call user.SaveAsync(), clear the authData array. For example:
user.authData.Clear();
await user.SaveAsync();
Leaving open as I want to incorporate a solution into the SDK ...
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.