Web3Auth io, want only showing login by email options

I want using web3auth.io for authentication and i want just login by email option that only show up on popup screen, can i do this?

current code is like this, but seems not working, still showing all login options

let user = Moralis.User.current();
	user = await Moralis.authenticate({
      provider: "web3Auth",
      clientId: "MY_CLIENT_ID",
	  loginMethodsOrder: ["email_passwordless"],
    });

@riocascade
Why are you using user variable at both places

Try something like this

let user = Moralis.User.current();
let handleAuth = await Moralis.authenticate({
     provider: "web3Auth",
     clientId: "MY_CLIENT_ID",
     loginMethodsOrder: ["email_passwordless"],
   });

i tried on their demo, seems the demo too can’t show email only options, so i think i will not using this web3auth

Hey guys, are you guys able to do any transaction with the smart contract using this login method?

This method works fine, maybe you can share more info about the problem encountered

Yes, Moralis.executeFunction while a user is logged into web3auth works as intended.

https://docs.moralis.io/moralis-dapp/web3/web3

1 Like