Hi im new in Moralis, and in programming at all,
im working on a vuejs version2, vuetify, moralis, and web 3
im making the sign in and sign out functions, but seems that doesnt work, and no error appears when i run it,
this is my component:
<template>
<div>
<div>
<button v-on:click="logIn()" id="btn">LogIn</button>
</div>
<div>
<button v-on:click="logOUT()" id="btn">LogOUT</button>
</div>
</div>
</template>
<script>
const Moralis = require("moralis");
const serverUrl = process.env.VUE_APP_MORALIS_SERVER_URL;
const appId = process.env.VUE_APP_MORALIS_APPLICATION_ID;
Moralis.start({ serverUrl, appId });
export default {
name: "loginMetamask",
components: {},
data() {
return {
walletAddress: "",
metaData: {},
contractAddress: "",
walletBalance: []
};
},
methods: {
async logIn() {
Moralis.start({ serverUrl, appId });
window.Moralis = Moralis;
await Moralis.authenticate();
},
async logOUT() {
Moralis.User.logOut();
console.log("logged out");
},
},
}
</script>
help!