It works now, however, Iâm not able to sign in with my Metamask wallet even though my account is opened. I tried Rinkebym Ropsten and Mainnet networks.
Iâm just seeing the dashboard.html and index.html but not able to interact with them. Iâm going through the moralis docs. Canât find a straight solution here to this problem
login = async () => {
await Moralis.Web3.authenticate()
.then(async function (user) {
let _username = document.getElementById(âuser-usernameâ).value;
let _email = document.getElementById(âuser-emailâ).value;
if(_username != ââ || _email != ââ){
if(_username != ââ){user.set(ânameâ, _username);}
if(_email != ââ){user.set(âemailâ, _email);}
await user.save();
}
window.location.href = âdashboard.htmlâ;
})
}
if (Moralis.User.current() != null && window.location.href == homepage) {
window.location.href = âdashboard.htmlâ;
}
logout = async () => {
await Moralis.User.logOut();
window.location.href = âindex.htmlâ;
}