
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
@saasquatch/integration-boilerplate-react
Advanced tools
Utilities for building SaaSquatch integration frontends in React
Utilities for building SaaSquatch integration frontends in React.
SaaSquatch is a platform for managing referral and rewards programs for digital businesses. Integrations with SaaSquatch are typically built as microservices which respond to webhooks and form handler triggers from SaaSquatch's forms platform.
Integrations also typically have a configuration interface where a user can configure the integration for a tenant and various responses to form handlers.
This package currently contains a single hook, usePenpal which sets up the environment for an integration frontend
and provides the methods required to communicate with the SaaSquatch portal to save configuration (amongst other
actions).
Here's an example of a fully functional integration frontend:
function Index() {
const penpal = usePenpal();
if (penpal.mode === ConfigMode.IntegrationsPage) {
return <P>This will be shown on the Integrations page.</P>;
}
if (penpal.mode === ConfigMode.FormConfigInitialDataActions) {
return (
<P>
This will be shown when configuring integration initial data actions for
a form.
</P>
);
}
if (penpal.mode === ConfigMode.FormConfigSubmitActions) {
return (
<P>
This will be shown when configuring integration submit actions for a
form.
</P>
);
}
return null;
}
function App() {
return (
<PenpalContextProvider
loading={
<p>This will be shown while the Penpal connection is being made.</p>
}
fallback={
<p>
This will be shown if this frontend is accessed from outside the
portal.
</p>
}
>
<Index />
</PenpalContextProvider>
);
}
The PenpalContextProvider is the main workhorse of connecting your frontend with the SaaSquatch portal. It takes care
of:
usePenpal hookWrap the top level of your React application in the provider to get access to usePenpal in any descendants:
function App() {
return (
<PenpalContextProvider
<Index />
</PenpalContextProvider>
);
}
The provider takes two optional props:
loading: JSX to render while the Penpal connection is being establishedfallback: JSX to render if the Penpal connection fails (i.e the frontend is not being rendered in the SaaSquatch
portal)In your components, you can usePenpal to get access to the state and the Penpal API.
It consists of the following properties:
mode: Which context is the frontend being rendered in - this is either ConfigMode.IntegrationsPage for main
integration config on the Integrations page, or
ConfigMode.FormConfigInitialDataActions/ConfigMode.FormConfigSubmitActions for configuration pages within the
configuration of a form.tenantScopedToken: A tenant-scoped JWT can be passed to your integration backend via fetch or equivalent for
authenticating requests from your frontend to the integration backend.tenantAlias: The tenant alias of the current tenantintegrationConfig: The configuration of the integration currently stored on the tenantformConfig: The integration-specific configuration for a formYou can call the following methods to interact with the portal:
saveIntegrationConfig(newConfig): Asks the portal to save new integration configuration for the tenantpatchIntegrationConfig(newConfig): Asks the portal to patch the integration configuration for the tenantsaveFormConfig(newConfig): Asks the portal to save new integration-specific config for the formnavigatePortal(url): Ask the portal to navigate to a portal-relative URLcloseFormConfig(): Ask the portal to close the form config modal (useful for Dismiss/Discard buttons in form config
frontends)getFileStackConfig(): Ask the portal to return the FileStack configurationFAQs
Utilities for building SaaSquatch integration frontends in React
We found that @saasquatch/integration-boilerplate-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.