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.
Due to Safari’s strict third-party cookie policies, the SDK is not preserving sessions after the app is closed. Our team is working to solve this issue soon.
Integration
- Wagmi v1
- Ethers
Install packages
- npm
- Yarn
- Bun
- pnpm
npm install react-native-webview @web3modal/email-wagmi-react-native
yarn add react-native-webview @web3modal/email-wagmi-react-native
bun add react-native-webview @web3modal/email-wagmi-react-native
pnpm add react-native-webview @web3modal/email-wagmi-react-native
On iOS, use CocoaPods to add the native modules to your project:
npx pod-install
Add the email connector in defaultWagmiConfig
import { EmailConnector } from '@web3modal/email-wagmi-react-native';
const emailConnector = new EmailConnector({ chains, options: { projectId, metadata } });
const wagmiConfig = defaultWagmiConfig({
chains,
projectId,
metadata,
extraConnectors: [emailConnector]
})
Install packages
- npm
- Yarn
- Bun
- pnpm
npm install react-native-webview @web3modal/email-ethers-react-native
yarn add react-native-webview @web3modal/email-ethers-react-native
bun add react-native-webview @web3modal/email-ethers-react-native
pnpm add react-native-webview @web3modal/email-ethers-react-native
On iOS, use CocoaPods to add the native modules to your project:
npx pod-install
Add the email connector in defaultConfig
import { EmailProvider } from '@web3modal/email-ethers-react-native';
const emailProvider = new EmailProvider({ projectId, metadata });
const config = defaultConfig({
metadata,
extraConnectors: [emailProvider],
})
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?