/verify page to your app. It shows a QR code, the user scans it with their digital identity wallet, and once the wallet proves who they are, the page shows your content.
Before you start
- A Next.js 14, 15 or 16 app using the App Router.
- Test keys from the Authbound dashboard. See Get API keys.
- The Authbound wallet on an Android phone, with a test ID in it. See Test with a wallet for setup.
Add your keys
.env.local
openssl rand -base64 32. The SDK uses it to encrypt its session cookie.pol_kyc_basic_authbound_v1 is a built-in policy that asks the wallet for the user’s name, date of birth and nationality, and confirms they’re over 18. You can swap it for another preset or your own policy later.Add the API route
This one route handles everything the browser needs from your server: starting a verification, checking its status, and setting a session cookie when it succeeds. Your secret key never leaves the server.
app/api/authbound/[[...authbound]]/route.ts
Wrap your app in the provider
The provider is a client component, so it goes in its own file.Then use it in your root layout, along with the SDK’s styles.
app/authbound-provider.tsx
app/layout.tsx
Try it
Runpnpm dev, open localhost:3000/verify and click Start Verification. Scan the QR code with your wallet and approve the request. The page switches to “You’re verified”.
On a phone, the page also shows a button that opens the wallet on the same device.
What just happened
Your server asked Authbound to start a verification, and the browser showed the wallet handoff. The wallet sent its proof to Authbound, not to your app. Authbound checked it against the policy, and the browser saw the result. The browser result is good enough to update the page, but not to grant access to anything that matters. For that, your server needs to confirm the result itself. How it works explains why.Next steps
Receive webhooks
Confirm results on your server before you grant access.
Protect routes
Send unverified users to
/verify automatically.Configure for production
Proxies, allowed origins, session modes and EUDI options.