React + Vite example using MetaMask Embedded Wallets (powered by Web3Auth) with an Auth0 connection via the JWT flow. The app fetches a JWT from Auth0 directly and passes it to Web3Auth for wallet derivation — giving you full control over the token exchange.
- Node.js 22.12+
- npm
- A Client ID from the Dashboard
- An Auth0 application with your domain and a custom Auth0 connection configured on the Dashboard (Auth0 guide)
git clone https://github.com/Web3Auth/web3auth-examples.git
cd web3auth-examples/custom-authentication/single-connection/auth0-jwt-examplenpm installcp .env.example .envEdit .env:
VITE_WEB3AUTH_CLIENT_ID=YOUR_CLIENT_ID
VITE_AUTH0_DOMAIN=YOUR_AUTH0_DOMAIN
VITE_AUTH0_CLIENT_ID=YOUR_AUTH0_CLIENT_ID
npm run devVisit http://localhost:5173 in your browser.
- MetaMask Embedded Wallets Documentation
- Build with AI — set up the MCP server and skill for AI-assisted integration
- Auth0 Integration Guide
- Dashboard
- Community — Builder Hub
MIT