MetaMask Embedded Wallets

June 5, 2026 · View on GitHub

MetaMask Embedded Wallets (powered by Web3Auth) provides non-custodial social login wallets using threshold key cryptography. Users authenticate with OAuth or custom JWT providers and receive a deterministic, self-custodied wallet — no seed phrase required.

This repository contains ready-to-run examples across frameworks, blockchains, and authentication providers.

Prerequisites

  • Node.js 22+
  • npm
  • A Client ID from the Dashboard

Use Sapphire Devnet for local development (allows localhost). Switch to Sapphire Mainnet only when deploying to production.

Quick Setup

git clone https://github.com/Web3Auth/web3auth-examples.git
cd web3auth-examples/<example-directory>
cp .env.example .env          # add your Client ID
npm install
npm start                     # or npm run dev / npm run serve

Example Directory

Quick Starts

The fastest way to get a working integration for your framework.

FrameworkExampleChainSDK Doc
Reactreact-quick-startEVMReact SDK
React (No-Modal)react-no-modal-quick-startEVMReact SDK
React + Solanareact-solana-quick-startSolanaReact SDK
Next.jsnextjs-quick-startEVMReact SDK
Vue.jsvue-quick-startEVMVue SDK
Vue.js + Solanavue-solana-quick-startSolanaVue SDK
Angularangular-quick-startEVMJavaScript SDK
Vanilla JSvanillajs-quick-startEVMJavaScript SDK

Custom Authentication — Single Connection

Each example wires one external identity provider to a dedicated Web3Auth connection. Set up your connection on the Dashboard before running.

ProviderExampleAuth FlowDashboard Guide
Google (OAuth)google-implicit-exampleImplicitGoogle
Google One Tapgoogle-one-tap-exampleImplicitGoogle
Facebookfacebook-implicit-exampleImplicitAuthentication
Discorddiscord-implicit-exampleImplicitAuthentication
Twitchtwitch-implicit-exampleImplicitAuthentication
Worldcoinworldcoin-implicit-exampleImplicitAuthentication
Auth0 (Implicit)auth0-implicit-exampleImplicitAuth0
Auth0 (JWT)auth0-jwt-exampleJWTAuth0
AWS Cognitocognito-implicit-exampleImplicitCognito
Firebasefirebase-jwt-exampleJWTFirebase
Custom JWTcustom-jwt-exampleJWTCustom JWT
Modal (default)modal-exampleModalDashboard

Custom Authentication — Grouped Connections

Grouped connections let multiple login methods resolve to the same wallet address for a user. Essential for apps that offer both social login and email passwordless login.

ProvidersExampleGuide
Auth0 + Google (Implicit)auth0-google-implicit-grouped-exampleGrouped Connections
Auth0 + Google (JWT)auth0-google-jwt-grouped-exampleGrouped Connections
Firebase + Google (JWT)firebase-google-jwt-grouped-exampleGrouped Connections
Google + Email Passwordless (Modal)modal-google-email-passwordless-grouped-exampleGrouped Connections

Other — Chains & Advanced Features

ExampleDescriptionDocs
algorand-exampleSign transactions on Algorand
aptos-exampleInteract with the Aptos Move blockchain
bitcoin-exampleSign Bitcoin transactions
cosmos-exampleInteract with Cosmos SDK chains
multi-chain-exampleOperate Ethereum, Solana, Tezos, and Polkadot in one session
polkadot-exampleSign transactions on Polkadot/Substrate
polymesh-exampleInteract with the Polymesh security token network
starknet-exampleInteract with StarkNet (Ethereum L2)
sui-exampleSign transactions on Sui
tezos-exampleSign transactions on Tezos
ton-exampleInteract with TON (Telegram Open Network)
tron-exampleSign transactions on TRON
xrpl-exampleInteract with the XRP Ledger
smart-account-exampleSend EVM transactions via Wagmi with Web3Auth as the signerSmart Accounts
server-side-verification-exampleVerify a Web3Auth id_token on your Next.js backendServer-Side Verification
solana-pay-exampleSolana Pay QR-code payment requests with Web3AuthSolana
sns-exampleSolana Name Service (SNS) resolutionSolana
sign-protocol-exampleOn-chain attestations on Sepolia via Sign Protocol
xmtp-exampleDecentralised messaging with XMTP

Build with AI

Speed up integrations by giving your AI coding assistant access to the documentation and SDK reference.

Skill (guides SDK selection, auth concepts, and common pitfalls):

npx skills add web3auth/skill

MCP server (live docs, examples, and SDK types). Add to Cursor or Claude Code:

{
  "mcpServers": {
    "web3auth": {
      "url": "https://mcp.web3auth.io"
    }
  }
}

Static docs (for tools without MCP support):

  • Full snapshot: https://docs.metamask.io/llms-embedded-wallets-full.txt
  • Index: https://docs.metamask.io/llms-embedded-wallets.txt

See the full Build with AI guide for per-agent setup.


Resources

License

MIT