Skip to main content
The StackOne Hub lets end-users authenticate and configure connectors enabled in your StackOne projects.
StackOne Hub - Connector Selection
StackOne Hub - Credential Entry

Choosing a Hub Version

StackOne offers two Hub versions. We recommend the Hub for new projects. The Legacy Hub remains available for existing implementations.

Why the Hub?

The Hub is a ground-up rebuild with a fundamentally different architecture:
  • Native React Component: The Hub renders directly in your React tree. The Legacy Hub loads an external script (connect.js) that injects an iframe. This means the Hub shares your app’s React context, supports proper component composition, and eliminates iframe-related overhead.
  • Direct API Communication: The Hub makes API calls directly from your app. The Legacy Hub routes requests through an iframe hosted on StackOne’s domain, adding latency from cross-origin communication and extra network hops.
  • Full Theming Support: The Hub uses our Malachite design system, giving you complete control over colors, typography, and styling. You can match your app’s design without CSS hacks or iframe styling limitations.
  • Better Event Handling: The Hub uses native React callbacks. The Legacy Hub relies on postMessage to communicate events across the iframe boundary, which can be less reliable and harder to debug.

Quick Start

The Hub (@stackone/hub) offers filtering, search, detailed error messages, and full theming support.
1

Install the package

2

Get a session token from your backend

The Hub needs a connect session token to securely communicate with StackOne. This token must be generated server-side to keep your API key secure.
See Connect your Backend with StackOne for backend implementation.
3

Add the component


API Reference

The StackOneHub component accepts these props:

Style Customization

The Hub supports full theming with the theme prop:
For custom theming, pass a PartialMalachiteTheme object:
See the @stackone/hub repository for full theme options.

Hub Behavior Customization

Control which connectors appear in the Hub by configuring the connect session on your backend.

Filtering Connectors

You can specify a provider or categories property when creating the connect session to control which connectors appear in the Hub:
  • provider: Opens the Hub directly at the credential entry screen for a specific connector, bypassing the connector listing
  • categories: Filters the Hub to show only connectors from specified categories (e.g., hris, ats)
If neither is specified, the Hub displays all connectors enabled for the project.
The connector specified in provider must be enabled in the Connector Profiles page of the associated project.
Find valid provider keys in the Supported Connectors list under the Provider Key column.

Backend Examples


Event Callbacks

All Hub versions support these callbacks:
Use onSuccess to update your UI or trigger backend syncs. Use onClose as a cleanup handler that always runs.

Dashboard Access

You can also use the Hub directly from the StackOne dashboard without embedding: Generate connection links from your dashboard to share with end-users.

Dashboard Connection Link Generation

Direct Account Linking

Link accounts directly from the dashboard interface.

Dashboard Account Linking


Backend Setup

Both hub versions require a connect session token generated from your backend. This keeps your API key secure.

Backend Implementation

Generate session tokens securely from your backend

API Reference

Connect Sessions endpoint documentation