Plain JavaScript (Vite) example using MetaMask Embedded Wallets (powered by Web3Auth) on EVM chains. No framework — just @web3auth/modal instantiated directly. Use this as a reference for integrations in environments without a framework (or as the foundation for any bundler-based setup).
- Node.js 20+
- npm
- A Client ID from the Dashboard
git clone https://github.com/Web3Auth/web3auth-examples.git
cd web3auth-examples/quick-starts/vanillajs-quick-startnpm installOpen src/main.js and replace the placeholder clientId value with your own Client ID from the Dashboard.
npm run devVisit http://localhost:5173 in your browser.
Use Sapphire Devnet (the default) for local development. Sapphire Mainnet does not allow localhost.
MIT