Skip to main content

Prerequisites

Before this page: have an embedded wallet created for the user (see Post-login user setup, which creates the wallet after login).

What you’ll build

When your project protects embedded wallets with a password, you own three moments:
  • Set the password the first time the wallet is created.
  • Unlock the wallet when the user returns on a new device or session.
  • Change the password later from a settings screen.
isPasswordRequiredForWaasWallets tells you whether any of this applies — skip these screens entirely when it returns false.

Setting the password during setup

Right after the wallet is created, if a password is required, prompt for one and set it.
The password can’t be recovered if the user forgets it. Make that clear in your UI, and pair it with a backup & recovery option so users aren’t locked out.

Unlocking on a new device

When a returning user signs in on a device that hasn’t unlocked the wallet yet, prompt for the password before the wallet can sign. Use getWalletRecoveryState to detect this: its walletReadyState is WalletReadyState.ENCRYPTED when this device’s key share is still locked (prompt to unlock) and WalletReadyState.READY once it’s unlocked. Check it after sign-in so you only show the prompt when it’s actually needed.

Changing the password

Offer a settings screen where the user provides their current password and a new one.

Handling errors

See also

Last modified on July 21, 2026