MetaMask Embedded Wallets (Web3Auth)
Before writing code, use MCP tools for live docs and examples. Do not guess package names, API signatures, or config.
Dashboard: https://developer.metamask.io
Docs: https://docs.metamask.io/embedded-wallets/
Community: https://builder.metamask.io/c/embedded-wallets/5
MCP tools (use in order)
Examples and SDK source are live-discovered from GitHub. references/examples.md has filter recipes only. Always call get_example before codegen. MCP live at https://mcp.web3auth.io
search_docs — Search docs (Algolia) and example projects.
query (required)
platform?: react | vue | js | react-native | android | ios | flutter | unity | unreal | node
chain?: evm | solana | other
category?: quick-start | custom-auth | blockchain | feature | playground
get_doc — Full doc page by URL (docs.metamask.io). Read platform SDK doc before codegen.
get_example — Complete example source from GitHub (primary integration reference).
name?, platform?, chain?, category?, auth_method? (e.g. firebase, auth0, grouped)
- Always fetch quick-start before a new integration; fetch auth-specific example for custom auth.
- Check for filter recipes and eval anchor namesreferences/examples.md
search_community — Builder Hub. query? or topic_id? for full thread.
get_sdk_reference — SDK source for debugging types/signatures only (not feature discovery).
platform (required), module? (omit first to list modules), focus?: types | hooks | main-class | errors | all (default types)
MCP unavailable: https://docs.metamask.io/llms-embedded-wallets-full.txt (full), https://docs.metamask.io/llms-embedded-wallets.txt (index).
Prerequisite - Dashboard Setup flow
- Create project at developer.metamask.io → Client ID.
- Sapphire Devnet (local) or Mainnet (production).
- Allowlist domains (web) or bundle IDs + deep link schemes (mobile).
- Configure chains on Dashboard (web/Node) or in code (RN, Android, iOS, Flutter, Unity, Unreal).
- Authentication: default socials or custom connections.
- Optional: session duration, test accounts, key export, whitelabel.
Read https://docs.metamask.io/embedded-wallets/dashboard/
Key derivation rules (CRITICAL)
Same wallet address requires all of:
- Same Client ID
- Same Sapphire network (devnet or mainnet — never mix)
- Same connection configuration (same auth connection ID)
- Same
useSFAKey boolean in integrations.
Change any → different address forever.
- Never change Client ID or Sapphire network in production.
- Sapphire is not blockchain devnet/mainnet. Devnet allows localhost; Mainnet does not.
- Local dev & staging: Sapphire Devnet. Production: Sapphire Mainnet only. Do not use Devnet in production.
- Avoid putting random flags like
useSFAKey / useCoreKitKey — unless user already has it or wants to use wallet pregeneration. Wallet pregeneration only works with useSFAKey / useCoreKitKey as true.
SDK selection
| Choose |
When |
React (@web3auth/modal/react) |
React, Next.js — Hooks |
Vue (@web3auth/modal/vue) |
Vue, Nuxt — Composables |
JavaScript (@web3auth/modal) |
Angular, Svelte, Vanilla JS |
React Native (@web3auth/react-native-sdk) |
Expo or Bare RN - Hooks |
| Android / iOS / Flutter |
Native mobile SDKs — export key + platform lib (no built-in provider) |
| Unity / Unreal |
Game SDKs — export key + platform lib (no built-in provider) |
Node.js (@web3auth/node-sdk) |
Backend, AI agents — custom JWT only, stateless |
Per-platform details and quirks: references/platforms.md
Scenarios
Fetch / tripwire / verify workflows by task: references/scenarios.md
Examples catalog [MOST IMPORTANT]
Examples are live on GitHub; call get_example or search_docs before writing integration code. MCP filter recipes and eval anchor names: references/examples.md
Authentication
Connections, implicit vs JWT flows, grouped connections, JWT iat rule: references/authentication.md
Migration
Upgrading existing integrations — version table, workflow, legacy PnP/CoreKit/SFA: references/migration.md
Summary: One guide per platform to current major (Web v11, RN v9, Android v9, iOS v10, Flutter v6). Use each guide's AI-assisted prompt. Never change Client ID or Sapphire network unless intentional.
Source: Web3Auth/web3auth-examples — distributed by TomeVault.
1---2name: web3auth3description: Integrates MetaMask Embedded Wallets (Web3Auth) for non-custodial wallets via social login or custom JWT (Firebase, Auth0, Cognito). Use when integrating @web3auth/modal (React, Vue, Next.js, Vite, Angular), @web3auth/react-native-sdk (Expo/bare RN—Custom Dev Client, not Expo Go), web3auth_flutter, native Android/iOS, Unity, or @web3auth/node-sdk. Invoke for Sapphire devnet/mainnet, dashboard client ID, grouped connections (same address across Google + email passwordless), implicit vs JWT auth flows, useWeb3AuthConnect, id_token server-side verification, or SDK migration (web v11, RN v9, OPENLOGIN_NETWORK/LOGIN_PROVIDER legacy). Also use when users get different wallet addresses per login method or need RN Metro setup/withWeb3Auth migration. Do NOT use for MetaMask browser extension only, RainbowKit/ConnectKit without embedded wallets, or unrelated smart-contract work.4---56# MetaMask Embedded Wallets (Web3Auth)78Before writing code, use MCP tools for live docs and examples. Do not guess package names, API signatures, or config.910Dashboard: https://developer.metamask.io 11Docs: https://docs.metamask.io/embedded-wallets/ 12Community: https://builder.metamask.io/c/embedded-wallets/51314## MCP tools (use in order)1516Examples and SDK source are **live-discovered** from GitHub. [references/examples.md](references/examples.md) has filter recipes only. Always call `get_example` before codegen. MCP live at https://mcp.web3auth.io17181. **`search_docs`** — Search docs (Algolia) and example projects.19 - `query` (required)20 - `platform?`: `react` | `vue` | `js` | `react-native` | `android` | `ios` | `flutter` | `unity` | `unreal` | `node`21 - `chain?`: `evm` | `solana` | `other`22 - `category?`: `quick-start` | `custom-auth` | `blockchain` | `feature` | `playground`232. **`get_doc`** — Full doc page by URL (`docs.metamask.io`). Read platform SDK doc before codegen.243. **`get_example`** — Complete example source from GitHub (primary integration reference).25 - `name?`, `platform?`, `chain?`, `category?`, `auth_method?` (e.g. `firebase`, `auth0`, `grouped`)26 - Always fetch quick-start before a new integration; fetch auth-specific example for custom auth.27 - Check for filter recipes and eval anchor names[references/examples.md](references/examples.md)284. **`search_community`** — Builder Hub. `query?` or `topic_id?` for full thread.295. **`get_sdk_reference`** — SDK source for **debugging types/signatures only** (not feature discovery).30 - `platform` (required), `module?` (omit first to list modules), `focus?`: `types` | `hooks` | `main-class` | `errors` | `all` (default `types`)3132**MCP unavailable:** `https://docs.metamask.io/llms-embedded-wallets-full.txt` (full), `https://docs.metamask.io/llms-embedded-wallets.txt` (index).3334## Prerequisite - Dashboard Setup flow35361. Create project at developer.metamask.io → Client ID.372. Sapphire Devnet (local) or Mainnet (production).383. Allowlist domains (web) or bundle IDs + deep link schemes (mobile).394. Configure chains on Dashboard (web/Node) or in code (RN, Android, iOS, Flutter, Unity, Unreal).405. Authentication: default socials or custom connections.416. Optional: session duration, test accounts, key export, whitelabel. 4243Read https://docs.metamask.io/embedded-wallets/dashboard/4445## Key derivation rules (CRITICAL)4647Same wallet address requires **all** of:4849- Same Client ID50- Same Sapphire network (devnet **or** mainnet — never mix)51- Same connection configuration (same auth connection ID)52- Same `useSFAKey` boolean in integrations.5354Change any → different address forever.5556- **Never** change Client ID or Sapphire network in production.57- Sapphire is not blockchain devnet/mainnet. Devnet allows localhost; Mainnet does not.58- Local dev & staging: Sapphire Devnet. Production: Sapphire Mainnet only. Do not use Devnet in production.59- Avoid putting random flags like `useSFAKey` / `useCoreKitKey` — unless user already has it or wants to use wallet pregeneration. Wallet pregeneration only works with `useSFAKey` / `useCoreKitKey` as true.6061## SDK selection6263| Choose | When |64|--------|------|65| **React** (`@web3auth/modal/react`) | React, Next.js — Hooks |66| **Vue** (`@web3auth/modal/vue`) | Vue, Nuxt — Composables |67| **JavaScript** (`@web3auth/modal`) | Angular, Svelte, Vanilla JS |68| **React Native** (`@web3auth/react-native-sdk`) | Expo or Bare RN - Hooks |69| **Android / iOS / Flutter** | Native mobile SDKs — export key + platform lib (no built-in provider) |70| **Unity / Unreal** | Game SDKs — export key + platform lib (no built-in provider) |71| **Node.js** (`@web3auth/node-sdk`) | Backend, AI agents — custom JWT only, stateless |7273Per-platform details and quirks: [references/platforms.md](references/platforms.md)7475## Scenarios7677Fetch / tripwire / verify workflows by task: [references/scenarios.md](references/scenarios.md)7879## Examples catalog [MOST IMPORTANT]8081Examples are live on GitHub; call `get_example` or `search_docs` before writing integration code. MCP filter recipes and eval anchor names: [references/examples.md](references/examples.md)8283## Authentication8485Connections, implicit vs JWT flows, grouped connections, JWT `iat` rule: [references/authentication.md](references/authentication.md)8687## Migration8889Upgrading existing integrations — version table, workflow, legacy PnP/CoreKit/SFA: [references/migration.md](references/migration.md)9091**Summary:** One guide per platform to current major (Web v11, RN v9, Android v9, iOS v10, Flutter v6). Use each guide's AI-assisted prompt. Never change Client ID or Sapphire network unless intentional.9293- Migration index: https://docs.metamask.io/embedded-wallets/migration-guides/9495---96> Source: [Web3Auth/web3auth-examples](https://github.com/Web3Auth/web3auth-examples) — distributed by [TomeVault](https://tomevault.io).97<!-- tomevault:4.0:skill_md:2026-06-17 -->