Login without creating a wallet

Hello,

I am trying to make the google login (or any other login) work without have a default wallet created, as the wallet creation for a user will depend on certain logic.

In all expamples I see I have to pass a chainConfig to a privateKeyProvider, im my case Ethereum.

Hoew can I instantiate the web3authInstance without the Ethereum privateKeyProvider, as I presume this creates the wallet by default.

Thanks!
Lucian

Hi @d.lucianionut,

I hope you’re having a great day!

To initialize Web3Auth, you need to send a provider as a parameter.

Could you please share what you’re planning to do? That way, I can assist you in achieving your goals in a better way.

Hello,

We plan to use web3auth to create and manage wallets for users which are new to web3 and also login in to au app users which allready have existing wallets.

But for users which are new to web3 and crypto we don’t want to create the wallet by default, which I understand happens via the current ETH provider instantiation.

We need a way to login the user via social login etc, without having the wallet created and only once we decide the user can create the wallet to programmatically create it.

Regards,
Lucian

hi @d.lucianionut

Did you try our PnP modal example ?

You can configure the modal as you wish and have the login with Social logins or external wallets.

Hello,

No I did not.
We are implementing this in NextJS.

However, I logged in via you’re example and I see the web3 wallet is created by default.

Our CTO talked with you’re team, and he was told that using the CoreKit we will be able to login and have the option to NOT generate the web3 wallet. However I can not find this documented in the CoreKit documentation.

So the flow should be :

  1. User logs In but NO web3 wallet is generated. Basically no ETH wallet address is created.
  2. Once the user makes certain actions, for example gets an NFT, we will programatically generate the wallet.

Do you know of such feature, or how can it be implemented?

Also I don’t see “email_passwordless” to be available for Web SDK’s. Is this correct?

Regards,
Lucian

hi @d.lucianionut

Our team recommends you use our Single Factor Authentication (SFA) SDKs

It’s straightforward to implement and allows users to log in according to their preferred authentication provider. Given that you need to create a wallet based on specific conditions, you can obtain the idToken directly from the authentication provider. Once the conditions are met, you can create a wallet through the SDK using the idToken.

Please check our examples with SFA and contact us if you have any other questions: web3auth-core-kit-examples/single-factor-auth-web at main · Web3Auth/web3auth-core-kit-examples · GitHub

Thanks!