Skip to content

Latest commit

 

History

History

README.md

MetaMask Embedded Wallets — Server-Side Verification

Next.js example demonstrating how to verify a Web3Auth id_token on the backend. After the user connects their wallet on the frontend, the app sends the token to a Next.js API route that validates it using the Web3Auth JWKS endpoint — proving the user owns the wallet address without any custodial trust.

Prerequisites

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

Setup

1. Clone the repository

git clone https://github.com/Web3Auth/web3auth-examples.git
cd web3auth-examples/other/server-side-verification-example

2. Install dependencies

npm install

3. Configure environment variables

cp .env.example .env.local

Edit .env.local:

NEXT_PUBLIC_WEB3AUTH_CLIENT_ID=YOUR_CLIENT_ID

4. Run the application

npm run dev

Visit http://localhost:3000 in your browser.

Resources

License

MIT