To run this example you can
cd examples/passport/wallets-connect-with-nextjs
pnpm install
pnpm dev
browse to http://localhost:3000 to see the full list of examples.
- Connect with EIP-1193 - Standard Ethereum provider
- Connect with EtherJS - Using ethers.js library
- Connect with Wagmi - Using wagmi library
- 🆕 Connect with Auth-Next (Default Auth) - Zero-config auth with
@imtbl/auth-next-client+@imtbl/wallet
- NEXT_PUBLIC_PUBLISHABLE_KEY // replace with your publishable API key from Hub
- NEXT_PUBLIC_CLIENT_ID // replace with your client ID from Hub
AUTH_SECRET- Required for NextAuth.js (min 32 characters). Generate one with:openssl rand -base64 32, or see NextAuth.js configuration- No other variables needed! ClientId and redirectUri are auto-detected.
The /connect-with-auth-next route demonstrates:
- Zero-config authentication using
@imtbl/auth-next-clientand@imtbl/auth-next-server - Integration with
@imtbl/walletusing thegetUserfunction fromuseImmutableSession() - Auto-detection of clientId (sandbox vs production based on hostname)
- Auto-derivation of redirectUri (from
window.location.origin) - Full wallet connection flow without manual configuration