Skip to main content

Email Login

Web3Modal SDK enables passwordless Web3 onboarding (no seed phrases) and authentication. It offers blazing-fast, hardware-secured, passwordless login, Web3 onboarding, and access to over 20 blockchains with a few lines of code — even if you have an existing auth solution.

caution

Email Login is currently in Beta

You can start integrating Email Login into Web3Modal SDK using either default or custom mode.

import { createWeb3Modal, defaultWagmiConfig } from '@web3modal/wagmi'

import { mainnet, arbitrum } from 'viem/chains'

// 1. Define constants
const projectId = 'YOUR_PROJECT_ID'

// 2. Create wagmiConfig
const metadata = {
name: 'Web3Modal',
description: 'Web3Modal Example',
url: 'https://web3modal.com',
icons: ['https://avatars.githubusercontent.com/u/37784886']
}

const chains = [mainnet, arbitrum]
const wagmiConfig = defaultWagmiConfig({
chains, // required
projectId, // required
metadata, // required
enableWalletConnect: true, // Optional - true by default
enableInjected: true, // Optional - true by default
enableEIP6963: true, // Optional - true by default
enableCoinbase: true, // Optional - true by default
enableEmail: true // Optional - false by default
})

// 3. Create modal
const modal = createWeb3Modal({ wagmiConfig, projectId, chains })