Skip to main content

Creating an embedded wallet

You can configure Privy to create embedded wallets for your users:

  • automatically, as a part of their first login to your app
  • manually, when you call Privy's createWallet

Read our embedded wallets configuration guide to see how to enable either option! Then, make sure to follow the appropriate instructions below, depending on how you've configured your app.

tip

In this guide, you can also check out the user experience of wallet creation.

Creating embedded wallets

If you've configured your apps to create embedded wallets for your users automatically when they login, you do not need to do anything else to create embedded wallets for your users. During login, they will automatically be prompted to create an embedded wallet if they do not already have one.

info

During login, if a user refreshes the page or prematurely exits the creation flow before the wallet is successfully created, they may be authenticated, without an embedded wallet. This can be detected by inspecting the authenticated) and user.wallet) properties from the usePrivy hook.

If this occurs, you can drop your user back into the wallet creation flow, by using the createWallet.

User experience

Depending on if you've configured your app to use password-based recovery or not, the user experience for wallet creation and recovery on a new device will differ.

Make sure to follow the appropriate guide below, depending on how you've configured embedded wallets.

info

Embedded wallets are secured with key splitting to make wallet recovery easy for your users.

Wallet creation

When using automatic recovery of the embedded wallet (the default), your users will not have to complete any additional steps to create an embedded wallet when they login. The wallet will be created behind-the-scenes.

Wallet recovery on a new device

Your users will not have to complete any additional steps to recover the embedded wallet on a new device. The wallet will be recovered behind-the-scenes.

tip

You can always have users set a password for their wallet later.

info

Due to how browsers enforce cross-origin restrictions in incognito windows, Privy embedded wallets are not currently available in incognito browser windows. We are working on better support for this use case!