Skip to main content
@phosra/connect is the parent-facing connect surface — a calm, branded, in-app modal that never navigates away, shows exactly which child and which rules are being granted, and ends on an explicit success. It is the Plaid Link of OCSS: the same recognizable surface everywhere, which is the trust mechanism. The component is presentation + state machine only. Every network call goes through a ConnectTransport you implement on your own backend — the parent never sees a secret, token, or signature, and your provider key never reaches the browser.

The transport contract

The component calls your backend through a ConnectTransport. Three calls are required; the fourth (provision) is optional and unlocks in-modal create-and-link. Each maps 1:1 to a createLink connect leg on your BFF.
verified drives the trust cue — never fake it. Success shows “Verified on the OCSS Trust List” only when verified === true (your BFF confirmed the census signed-receipt actually verified to root). Otherwise the modal shows <Platform> connected — confirming enforcement… (where <Platform> is the platform name). Return verified honestly; a green badge with no verified receipt is the one thing the branding rule forbids.
provisioningForm is server-advertised. If complete returns provisioningForm: "batch", that overrides the component prop — the platform told the census it accepts batch provisioning, and the modal offers the create-and-link step. Your bind / provision handlers deliver signed to the OCSS root; there is no connect secret anywhere in this flow.

Web quickstart

The two entity icons remain independent. Phosra Link derives each standardized tile from that entity’s approved Mark and composes provider → Phosra → platform at render time; it does not create a combined image or require a separate app-icon upload. The parent sees three earned trust cues rendered as calm badges — “Accredited on the OCSS Trust List” (intro), the concrete rules preview (the real rules you pass), and Verified on <Platform> (only when bind returned verified === true). No secret, no token, no signature is ever surfaced.

Props

ConnectFlow takes the identical props if you want the flow inline rather than in a modal shell. React Native is the same API from @phosra/connect/native.
When there are no existing profiles on the platform and you pass a provisioningForm plus a transport.provision, the modal shows a no_profiles step with a “Create & connect” button. The parent creates the banded child profiles and binds them in one contained step — no new tab, no dead-end.
Under the hood the modal advances through two new statuses: no_profiles (the create step is offered) and creating (the signed provision delivery is in flight). Your transport.provision returns { grant_id, verified, provisioned }provisioned is the count created.

Headless: useConnect

For a fully custom UI, drive the state machine directly with useConnect and render your own chrome (branding still required — see below).
createProfiles() is valid only while status === "no_profiles"; it runs the signed transport.provision and advances the machine.

Branding is mandatory

The drop-ins render the Phosra Link branding — the phosra · OCSS lockup, the “Accredited / Verified on the OCSS Trust List” trust signals, and the never-a-fake-green honesty rule (the verified badge only ever appears when the census receipt actually verified). This is required, not optional: any Phosra Link connect/consent surface MUST use the published kit, a provider may not hand-roll or restyle the branded consent, and the platform auth leg MUST co-brand Phosra Link · <Platform>. Consistency is the trust mechanism, and it is assessed at accreditation. See the Phosra Link Branding Requirement.

Next