Skip to main content
The activation form is what a user fills in to connect your integration. Use BaseActivationForm for the dialog chrome, submit button, and loading states.

Basic form

Props

ActivationFormProps is IntegrationComponentProps plus:
IntegrationComponentProps is { accountId, sourceId?, integrationConfig? } plus exactly one of productId or productSlug.
  • inline — pass through; without it the form mounts its own dialog, so a page that embeds it ends up with nested dialogs
  • onSuccess — call it with an ActivationResult ({ success, configData?, externalId?, errorMessage?, metadata? }) once activation succeeds. Values you want back on the client go in configData
  • onCancel — call it when the user cancels

Declaring fields and secrets

List the fields your form submits in the definition and mark each credential secret: true:
A secret: true field is stored in the platform vault under its exact field name, never in the connection record that every member of the team can read. Read it on the server with ctx.secrets.get('<field name>'). Non-secret fields stay in the connection record and are also readable through ctx.secrets.get().
  • A field whose name reads like a credential (apiKey, client_secret, password, token, github_pat) must declare secret: true or secret: false. defineIntegration() and ekanos validate reject it otherwise.
  • Only declared fields are stored. Anything else the form posts is dropped.
  • A field takes name, label, description, type ('text' by default, or 'number' / 'boolean'; a secret is always text) and required (default true).
  • Submitting the form again rotates a secret in place. A blank secret field keeps the stored value.
  • Declaring the fields also lets ekanos teams connect ask for them in the terminal, hiding the secret ones.
  • A form that declares no fields still works, but the platform can only guess which of its fields are credentials, by name. Declare them.
  • Never pass a credential back in onSuccess({ configData }): that is stored with the connection settings, in the clear.
The field name is the secret name. Put names in a constant to avoid drift:
Use the same constants in the form, the activation declaration and your handlers.

OAuth variant

For an integration whose definition declares oauth, OAuthActivationForm renders a “Connect with …” button that sends the browser to the host’s connect route, then activates once the OAuth redirect returns with a live connection. Point it at the hosted routes with the helpers from @ekanos/sdk/hooks rather than spelling the paths yourself:
config also accepts successTitle, connectedBanner, connectButtonText, activateButtonText, externalIdPrefix, and autoActivateOnConnect (default true; set false when the user should review post-connect settings before activating). Pass connectPath explicitly — its default points at a per-integration route that partner integrations do not have. useOAuthConnectionStatus(accountId, { connectionKey, checkConnection, errorParam }) is the underlying hook if you build your own form. See OAuth.

Declaration

Forms are optional. Omit it and the host renders a generic one — a plain field per value it needs. Declare activation.fields beside it, as above.

Error handling

Errors from activate.mutateAsync become the error prop:

Troubleshooting

No IntegrationActivationProvider is mounted

Submitting rejects with No IntegrationActivationProvider is mounted. The host application must bind its activation server actions (see @ekanos/sdk/hooks IntegrationActivationProvider) above any component that activates integrations. You’re rendering outside the host (Storybook, your own app). Mount IntegrationActivationProvider from @ekanos/sdk/hooks with activate and deactivate functions:

Nested dialogs

Forgot to pass inline? The form mounts its own Dialog, causing nesting. Always pass through: inline={inline}.

Next steps

  • Secrets — credential management
  • Widgets — what renders after activation