Skip to main content
Copy-pasteable setups for the most common frameworks. Each one installs the SDK and launches the flow; the /api/session endpoint is covered in Backend Integration.
These examples use debug: true, which logs the flow’s progress to the browser console while you develop. To receive the connected account in your code — to save it or update your UI — add the onSuccess / onError / onCancel callbacks.
Backend :
.env:
Only NEXT_PUBLIC_-prefixed vars reach the browser. GATEWAY_SECRET_KEY has no prefix, so it stays server-side in the Route Handler only.Reminder: NEXT_PUBLIC_ values are baked in at build/dev-server start. If you add or change one, restart the dev server — it won’t hot-reload.