Trigger authorization flows in your frontend with this SDK. It is available on NPM as @nangohq/frontend.

Instantiate the frontend SDK

import Nango from '@nangohq/frontend';

let nango = new Nango({ publicKey: '<PUBLIC-KEY>' });
Parameters

Collect & store end-user credentials

You store end-user credentials with the nango.auth method. It creates a connection in Nango.
For OAuth, this will open a modal to let the user log in to their external account.
const result = await nango.auth('<INTEGRATION-ID>', '<CONNECTION-ID>').catch((error) => {
...
});
Parameters Success response Error response
Questions, problems, feedback? Please reach out in the Slack community.