Now it authenticate but the USER object is not being created and stored automatically in Moralis server, the User row in the table remains in 0, like all the rest.
What am I missing?
console.log('hello world');
// connect to Moralis server
Moralis.initialize("OVQv4GzkGYKOJmcd2UE0wF6AGh4Czz6Vlq6Sfzn8");
Moralis.serverURL = "https://krkxhau0hur3.usemoralis.com:2053/server";
login = async () => {
await Moralis.authenticate().then(async function (user) {
console.log('logged in')
user.set("name", document.getElementById('user-name')).value;
user.set("email", document.getElementById('user-email')).value;
await user.save();
})
}
document.querySelector('#btn-login').onclick = login;