Skip to main content

Prerequisites

  • Node.js 18+
  • A 0xkey organization (Dashboard or local stack via ./local-dev.sh start)
  • Auth Proxy enabled for your organization (Dashboard → Auth / Wallet Kit)

Step 1 — Configure Auth Proxy in the Dashboard

1

Enable Auth Proxy

Open the Dashboard Auth (Wallet Kit) section and turn Auth Proxy on.
2

Choose auth methods

Enable the methods you need (e.g. Email OTP and Passkeys for a typical embedded wallet).
3

Copy IDs

Copy your Organization ID and Auth Proxy config ID — you will pass them to the SDK.
See Auth Proxy for endpoint details and CORS / allowed-origins configuration.

Step 2 — Create a Next.js app (optional)

Step 3 — Environment variables

Create .env.local:

Local development (super-repo stack)

When running ./local-dev.sh start with local-gateway: Add 127.0.0.1 0xkey.com api.0xkey.com authproxy.0xkey.com app.0xkey.com docs.0xkey.com export.0xkey.com import.0xkey.com demo.0xkey.com to /etc/hosts and trust the local-gateway CA certificate.

Step 4 — Wrap your app with ZeroXKeyProvider

With the App Router, keep layout.tsx as a server component and add a client providers.tsx:
app/providers.tsx
app/layout.tsx

Step 5 — Log in or sign up

handleLogin opens a modal with every auth method enabled in your Auth Proxy config.

Step 6 — Sign a message or transaction

After login, use handleSignMessage, handleSignTransaction, or the lower-level clients documented in signing examples.
Phase 1 limits. On-chain broadcast and gas sponsorship are not production-ready — eth_send_raw_transaction returns a mock receipt today. Design signing-first flows and check the Roadmap before relying on send helpers.

Reference implementations

Troubleshooting