Skip to content

Configuration

type SigilConfig = {
organizationId: string;
publishableKey: string;
iframeUrl: string;
authMode?: 'sigil' | 'oidc';
getToken?: () => Promise<string>;
iframeContainer?: HTMLElement;
};

organizationId  required

UUID of your company in Sigil. You’ll see it in the portal dashboard under Company → ID. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

The iframe rejects init if this id doesn’t match the org of the publishable key. Mismatches are normally a sign of a copy-paste from another tenant.

publishableKey  required

The pk_live_… key minted from the portal API keys tab, type publishable. Safe to commit, safe to ship in your bundle. Identifies your company to Sigil but does not authorize signing — that needs the end-user JWT or session.

Rotate from the portal whenever you want; Cloud Run picks it up automatically on next request.

iframeUrl  required

Origin where the wallet iframe lives. For production: https://wallet.sigilkeys.com. For local dev: http://localhost:5173 (or whatever port your pnpm dev:iframe is on).

The iframe enforces a strict per-org allowlist of parent origins; make sure window.location.origin is in your Allowed origins list in the portal settings before calling init().

authMode  default 'sigil'

ValueWhat it does
'sigil'The iframe shows the email-OTP UI. End users authenticate to Sigil directly. Easiest path.
'oidc'Your existing OIDC provider (Auth0, Keycloak, Cognito, Firebase…) issues the JWT. Sigil validates it via your JWKS.

Configure the matching auth_config from the portal Authentication page before flipping this option.

getToken  required if authMode === 'oidc'

getToken: async () => {
const token = await yourAuth.getAccessToken();
return token; // a JWT signed by your IdP
}

Called once per init(). If your token can expire mid-session, just return a fresh one — Sigil revalidates against your JWKS.

iframeContainer  optional

Defaults to document.body. If you want the iframe nested inside a specific element (e.g. a modal you control) pass that node here. Sigil appends one <iframe> child; sizing, borders and visibility are yours.