MetaMask Embedded Wallets Node Examples
Node.js CLI examples using @web3auth/node-sdk v6 for backend custom-auth flows.
These examples are intentionally minimal and focus on:
- JWT-based login with authConnectionId
- Wallet reconstruction through Web3Auth Sapphire networks
- Basic EVM (viem) or Solana (@solana/kit) signing/balance calls
Requires Node.js 22+.
cd <example-folder>
npm install
npm start
Example:
cd evm-quick-start
npm install
npm start
- Create a project in Web3Auth Dashboard
- Configure a custom auth connection and note its authConnectionId
- Keep your Client ID, authConnectionId, and web3AuthNetwork consistent
- Requires Node.js 22+ (@web3auth/node-sdk v6).
- EVM examples use viem WalletClient signers returned by connect().
- Solana example uses @solana/kit for RPC and message signing.
- This repo uses MetaMask Embedded Wallets docs and APIs (legacy web3auth.io/docs links are outdated).
- Node SDK is backend-only and custom-auth-focused; it does not provide social-login UI.
- JWTs must be freshly issued; stale iat values can fail login.
- These examples include demo credentials and keys for learning only. Do not use as-is in production.
MIT - see LICENSE.