hey, i am facing the same issue. can ou pls explain where do I have to change the code.(Non tech background)
> <html>
> <head>
> <!-- Moralis SDK code -->
> <script src="xx"></script>
> <script src="xx"></script>
> </head>
>
> <body>
> <h1>Try it once</h1>
> <button id="btn-login">Moralis Login</button>
> <button id="btn-logout">Logout</button>
> <script>
> // connect to Moralis server
> Moralis.initialize("xxx");
> Moralis.serverURL = "https://wjdserver";
>
> // add from here down
> async function login() {
> let user = Moralis.User.current();
> if (!user) {
> user = await Moralis.authenticate();
> }
> console.log("logged in user:", user);
> }
> initializeApp();
> 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>
the code is not opening metask