Web3Auth return different wallet address from Torus wallet

Hi everyone, recently I’m just follow the web3auth tutorial and Im cloned the code and replace the API keys with my own, when I run the code with local machine, no issues occur from the login process, but the wallet address return by the web3auth is different from my registered account wallet address (Gmail), How can I solve this issue?

I don’t understand, so what you expect is the wallet address be your gmail address?

When a user login with web3auth, the user will get a wallet keypair that associate with the gmail account, that is what I mean.

yes it is, but what address are you comparing to that is different?

The wallet address (starting with 0x030…, 0 balance) shown in the web3auth tutorial app is different from the address (starting with 0x090…, with some test net balance) that shown in the Torus wallet.

Hm I think it’s best to join their discord and ask as we are just integrating them and don’t know the details to be honest about their inner working

When you learn the answer by speaking to Web3Auth - please post it here so others can see too :pray:


Maybe a new wallet address is generated per account. In case that you compare some address from a tutorial with your address.

No, I’m not comparing the address from the tutorial video, the tutorial app is my own cloned version.

I had the same issue and found out that web3auth and Torus wallet are 2 different things (you won’t get the same address for the same email) :slightly_smiling_face:

How can I get new address after web3auth login?
I want to get address without metamask or any other wallet login.
Is it possible?

Web3Auth generates an address for you if you sign in with unique credentials e.g. email for the first time.

You can get it with Moralis.User.current().get('ethAddress'). Or if you’re using react-moralis, account from useMoralis hook.

No, we can’t get ethAddress because we only logged in using email.
Without wallet login, new address wouldn’t be created automatically.
My users don’t have any kinds of wallets like metamask.
So I wanted to create public address without wallet login,

Just email login, I need to create public address from web3Auth.
Is it possible?

you could try to look in local storage to see if is anything saved there

Sorry, you didn’t get my point.
Is it possible to create public address from web3Auth without wallet login?

Currently I can get ethAddress from metamask wallet login.
I need to get ethAddress without metamask wallet login. (because my users don’t like to use wallet. they only have email for now)

Without wallet login, new address wouldn’t be created automatically.

Is it possible to create public address from web3Auth without wallet login?

Web3Auth generates a wallet address for you even if you login only via normal email - that is the main idea for using Web3Auth (onboarding Web2). For example, if I authenticate with:

await Moralis.authenticate({
  provider: 'web3Auth',
  clientId: '',

And I sign in with my email (“Continue with Email”) and click the “Verify your email” email link, I can get the generated address with Moralis.User.current().get('ethAddress').

Any transactions I then make e.g. with Moralis.executeFunction() are signed automatically and made from this Web3Auth address if I stay connected.

How are you trying to get the address? Try clearing your browser’s cache and localStorage items for your app, and then authenticate again. You can also check your localStorage after signing in for the current user data as cryptokid mentioned - the address can also be checked there.