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ā;
}