Skip to main content
You are viewing docs for the previous version of the Wallets SDK. We recommend upgrading to V1. See the updated version of this page or the V1 migration guide.
Use an email OTP signer as a recovery signer to let users regain access to their wallets when their operational signer is no longer available — for example, when they switch to a new device. The user verifies ownership of their email address via a one-time password, which authorizes the enrollment of a new operational signer.
Email OTP is a recovery signer, not an operational signer. It is not intended for authorizing day-to-day transactions. The code examples below show how to configure it as the initial signer at wallet creation time, which sets up email-based recovery for the wallet.
For a conceptual overview, see Email OTP in the Wallet Signers guide. To learn how to register operational signers on a wallet, see Registering a signer.

Configuration

import { useWallet } from '@crossmint/client-sdk-react-ui';

const { getOrCreateWallet } = useWallet();

const wallet = await getOrCreateWallet({
    chain: "base",
    signer: {
        type: "email",
        email: "user@example.com"
    },
});