Email Wallets
Web3Modal SDK enables passwordless Web3 onboarding and authentication, allowing your users interact with your application by creating a non-custodial wallet with just their emails.
Email wallets are supported in the latest version of Web3Modal. If you are using an older version, make sure to upgrade.
Integration
- Wagmi
- Ethers
- Default
- Custom
If you're using the defaultWagmiConfig
function you can enable email login by just adding enableEmail: true
as a configuration parameter.
const wagmiConfig = defaultWagmiConfig({
chains,
projectId,
metadata,
enableEmail: true // Optional - false by default
})
If you're using the createConfig
function from Wagmi, you can enable email login by importing and adding the emailConnector
function in your configuration.
import { emailConnector } from '@web3modal/wagmi'
//...
const wagmiConfig = createConfig({
//...
connectors: [
//...
emailConnector({ chains, options: { projectId } })
]
})
To enable email wallets in Web3Modal add enableEmail: true
as a configuration parameter of the defaultConfig
function.
const modal = createWeb3Modal({
ethersConfig: defaultConfig({
metadata,
//..
enableEmail: true
})
//...
})
User Flow
-
Users will be able to connect to you application by simply using an email address. Web3Modal will send to them a One Time Password (OTP) to copy and paste in the modal, which will help to verify the user's authenticity. This will create a non-custodial wallet for your user which will be available in any application that integrates Web3Modal and email login.
-
Eventually the user can optionally choose to move from a non-custodial wallet to a self-custodial one by pressing "Upgrade Wallet" on Web3Modal. This will open the (WalletConnect secure website) that will walk your user through the upgrading process.
Video Tutorial
Was this helpful?