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.
- Node.js 20+
- npm
- A Client ID from the Dashboard
git clone https://github.com/Web3Auth/web3auth-examples.git
cd web3auth-examples/other/server-side-verification-examplenpm installcp .env.example .env.localEdit .env.local:
NEXT_PUBLIC_WEB3AUTH_CLIENT_ID=YOUR_CLIENT_ID
npm run devVisit http://localhost:3000 in your browser.
MIT