Hello, Could someone help at all. The code below is as follows. Metamask does not load upon clicking login. It wouldnāt work, then it did work and now will not work again.
<html>
<head>
<!-- Moralis SDK code -->
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script src="https://unpkg.com/moralis/dist/moralis.js"></script>
</head>
<body>
<h1>Gas Stats With Moralis</h1>
<button id="btn-login">Moralis Login</button>
<button id="btn-logout">Logout</button>
<script>
// connect to Moralis server
Moralis.initialize (6bQeg1LjiujEARMEBsH8oQfHDC4hVCBpSmGAhLhm);
Moralis.serverURL = https://xbr6mqradtof.moralis.io:2053/server;
async function login() {
let user = Moralis.User.current();
if (!user) {
user = await Moralis.Web3.authenticate();
}
console.log("logged in user:", user);
}
async function logOut() {
await Moralis.User.logOut();
console.log("logged out");
}
document.getElementById("btn-login").onclick = login;
document.getElementById("btn-logout").onclick = logOut;
</script>
</body>
</html>
Something seems wrong with my application ID, as i get error messageā¦āAn identifier or keyword cannot immediately follow a numeric literal.javascriptā
I also did not use the SERVERLESSWEB3 invite code as i signed up and then saw it. I donāt know if this should make a difference although it was obviously put there for a reason!!