Nango provides a UI component that guides your app’s users through automatically and securely setting up an integration. This UI is hosted on Nango’s servers and requires minimal setup on your end to get started quickly.
This is the recommended way to use Nango in your frontend.
If true, nango.auth() would fail if the login window is closed before the authorization flow is completed.
authorization_params
object
For OAuth, specify the query parameters of the authorization URL.
user_scope
string[]
For Slack OAuth, specify user-specific scopes.
credentials
object
apiKey
string
For API key authorization, pass in the user’s API key.
username
string
For Basic authorization, pass in the user’s username.
password
string
For Basic authorization, pass in the user’s password.
oauth_client_id_override
string
For OAuth 2, override the integration’s client ID with a connection-level client ID. This is useful when your users bring their own OAuth 2 app (e.g. Netsuite).
oauth_client_secret_override
string
For OAuth 2, override the integration’s client secret with a connection-level client secret. This is useful when your users bring their own OAuth 2 app (e.g. Netsuite).
Success response
providerConfigKey
string
The integration ID that you can find in the integration settings on the Nango UI.
connectionId
string
The connection ID that you can find in the Connections tab on the Nango UI.
Error response
error
object
type
string
The type of error (e.g. ‘authorization_cancelled’).
message
string
The detailed error message (e.g. ‘Authorization fail: The user has closed the authorization modal before the process was complete.’).
By default we are auto generating the connectionId which is the unique identifier of this connection but ou can also specify it like this:
const result =await nango.auth('<INTEGRATION-ID>','<CONNECTION-ID>');
Questions, problems, feedback? Please reach out in the Slack community.