What is the Connect UI?
The Connect UI is a Nango-hosted interface that handles the entire authorization flow for your users. It opens as a full-screen iframe in your product and guides users through OAuth logins, API key entry, and provider-specific configuration — without any custom UI code from you. It is white-labeled: it shows provider logos and names, but no Nango branding. You can customize the theme, language, and which integrations are available.Install the frontend SDK
Initialize and open the Connect UI
openConnectUI() call immediately renders the iframe. A loading indicator is shown until you call setSessionToken(). Separating the two calls lets you open the UI optimistically while your backend request is in flight.
Event types
TheonEvent callback receives events from the Connect UI:
| Event type | Payload | Description |
|---|---|---|
ready | — | The iframe has loaded and is ready to receive the session token. |
connect | { connectionId, providerConfigKey } | Authorization succeeded. A new connection has been created. |
close | — | The user closed the UI. This does not indicate success or failure. |
error | { errorType, errorMessage } | Authorization failed. |
settings_changed | ConnectUISettings | The user changed a setting inside the UI (for example, theme). |
Customization options
Pass options toopenConnectUI() to control the UI behavior:
allowed_integrations when creating the session token on your backend:
Close the UI programmatically
TheopenConnectUI() method returns a ConnectUI instance. Call .close() on it to dismiss the UI from your code:
Use a custom auth UI instead of Connect UI
If you need full control over the authorization UX — for example, to build a custom API key entry form — you can usenango.auth() directly instead of openConnectUI(). Initialize the SDK with the session token first:
nango.auth() with the appropriate credentials for the auth type:
- OAuth
- API key
- Basic auth
params:
Share a connect link
A connect link lets you trigger authorization without embedding the Connect UI in your product. This is useful for email-based onboarding, support-assisted setup, or cross-device flows. Generate a connect link from your backend:- TypeScript
- cURL
connect_link is a short-lived URL that expires after 30 minutes. Send it to the user via email, Slack, or any other channel.
Generate a connect link from the dashboard:
Open the Connections page in the Nango dashboard and use the Share connect link button to generate a link without writing any code.
Next steps
Implement auth
Full guide to setting up the authorization flow end to end.
Connection management
List, retrieve, and manage connections after they are created.