I get an error that tells me I need to install @web3auth
.
I have watched the instruction video, but cannot tell what I’m doing wrong with my code.
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/moralis.js">
<script src="https://unpkg.com/@web3auth/web3auth@latest/dist/web3auth.umd.min.js"></script>
<button id="btn-signin">Signin</button>
<script>
/* Moralis init code */
const serverUrl = "MY-SERVER-URL";
const appId = "MY-APP-ID";
Moralis.start({ serverUrl, appId });
async function SignIn() {
const user = await Moralis.authenticate({
provider: "web3Auth",
clientId: "MY-CLIENT-ID",
loginMethodsOrder: [
"line", "google", "facebook", "twitter", "reddit", "discord", "twitch", "apple", "github", "kakao", "linkedin", "weibo", "wechat", "email_passwordless"
],
theme: "light",
})
}
document.getElementById("btn-signin").onclick = SignIn;
</script>
I could have successfully logged-in/logged-out.
Now, I want my users signup via Web3Auth.
Thanks in advance.