From open protocol to working components.
Implementation guides for the identity operator, application SDK and independent passkey wallet, alongside the v0.4 working draft documentation.
Current documentation, ready to download.
A curated release from the repository’s current documentation: operator setup and APIs, Google and Apple configuration, popup and own-dialog integration, selected SDK source and tests, corrected wire definitions, and wallet guides. The FedCM design is included as roadmap material.
Source revision 79397d52ee79 · Protocol v0.4 working draft · SHA-256 390ed10249c92438c0e1755e570fac355373de9b40035791a97c205fc1a9bfbc
This public archive includes selected documentation, SDK source, focused tests and example snippets. It is not a full software checkout or production deployment bundle. The private source repository remains the place to build the operator, wallet and SDK.
The current source of truth
The repository’s docs/ guides describe the identity operator and wallet as implemented. The upstream v0.2-draft/ directory records the earlier design baseline and decisions; original source-document names are preserved in the v0.3 release. Where they differ, the implementation documentation describes what runs.
This release is designated v0.4 working draft, advancing the published protocol implementation documentation and Technical Package from v0.3. Its main addition is a branded email dialog that hands authentication to the operator popup, alongside corrected wire contracts and implementation maintenance. It is based on the main-branch documentation reviewed on 30 November 2026, and the Technical Package is the 2026.11.30 edition.
Open the documentation index · Read the earlier v0.2 design baseline
The source repository is currently private. The GitHub links on this page require repository access; the summaries on this site are public.
The identity operator
One Rust binary, crosspollinate-operator, plus cp-cli, backed by PostgreSQL. actix-web serves HTTP; Leptos renders pages with WebAssembly islands for passkeys and wallets. The same binary can serve a configured trust anchor.
| Guide | What it covers |
|---|---|
| Getting started | Builds, database initialization, operator keys, tests and demos |
| Architecture | Use-case crates, adapters, browser UI, storage, envelope encryption and background jobs |
| Configuration and CLI | Operator settings, migrations, federation, key rotation and diagnostics |
| Browser pages | Sign-in, consent, account management, profiles, linked wallets and organization administration |
| API reference | OpenID protocols and discovery, native endpoints, sessions, formats and limits |
Application integration
@crosspollinate/sdk is a Node.js TypeScript SDK built on openid-client and jose. It handles PKCE and pushed authorization requests, an operator chooser and sign-in button, federation registration, and RP-initiated and back-channel logout.
A backend-for-frontend keeps tokens on the server. Its default in-memory session store suits one instance; deployments with several instances need a shared session store. Federation clients publish an entity configuration and pin trust anchors; non-federated clients can register through cp-cli.
Enable Google and Apple at an operator
Each operator registers its own clients and exact HTTPS callbacks. Relying-party websites continue using Crosspollinate; they do not each need separate Google or Apple integrations.
| Provider | Operator setup |
|---|---|
A Web application OAuth client, openid email scopes, and https://{operator}/signin/google/callback. Set the client secret through CP_AUTH__PROVIDERS__GOOGLE__CLIENT_SECRET. Google testing mode restricts access to test users. | |
| Apple | An App ID with Sign in with Apple, a configured Services ID, team/key IDs and a protected .p8 key. Register https://{operator}/signin/apple/callback; Apple returns through a form POST. |
| Apple relay | Register the operator’s mail sender with Apple’s Private Email Relay and ensure its SPF covers the actual sender, so codes and security notices reach Hide My Email addresses. |
| Operator privacy | Raise [auth] privacy_version when introducing the providers, update the operator’s notice and restart. Keep credentials server-side. |
The operator binds the pending sign-in to a browser cookie, state and nonce, checks provider tokens, and consumes the flow once. Provider login is email-level assurance and remains subject to email_login_after_passkey; it is not a substitute for passkey step-up or wallet recovery.
Add a login popup to your website
Mount the SDK’s createBff on your application’s own origin, including its login, callback and /auth/me routes. Keep the registered callbacks and federation configuration in place. A custom integration that directly calls startLogin and finishLogin must adopt this BFF callback flow before using the popup helpers.
On the opening page, use the following header if you set Cross-Origin-Opener-Policy. Omitting the header also works; same-origin severs the opener relationship and causes an immediate closed failure.
Cross-Origin-Opener-Policy: same-origin-allow-popupsCall the helper directly from a click, before awaiting any other work:
import { signInWithPopup, PopupSignInError } from "@crosspollinate/sdk/browser";
button.addEventListener("click", async () => {
try {
await signInWithPopup();
const response = await fetch("/auth/me", { cache: "no-store" });
if (!response.ok) throw new Error("No authenticated session");
const me = await response.json();
showSignedIn(me);
} catch (error) {
if (error instanceof PopupSignInError && error.code === "closed") return;
showError(error);
}
});Or render the SDK’s button on the server and enable its marked links or forms in your browser bundle:
// Server
signInButton("/auth/login", "/assets", { popup: true });
// Browser: import from @crosspollinate/sdk/browser
enablePopupSignIn();The default window is 480 × 640. The new loginHint option prefills the person’s email or handle at the operator, whereas hint selects an operator or discovery route. basePath and cookieName must match the BFF; hint can select an operator, handle or email. enablePopupSignIn reloads after success by default and accepts onSignedIn and onError callbacks.
| What happens | Result |
|---|---|
| Successful sign-in | BFF validates the callback and creates the HttpOnly session. A BroadcastChannel and same-origin postMessage announce completion without tokens or claims. Read /auth/me to confirm the user. |
| Person closes the window | The helper checks for a session and rejects with closed if none exists. |
| Cancellation or failure | access_denied, invalid_response or the applicable server/error code. |
| Browser blocks the window | The page navigates to normal redirect sign-in. The popup promise does not settle during that navigation. |
Operator pages keep their anti-framing protections. Popup sign-in is not a modal that embeds Google, Apple or the operator in an iframe. Authentication still ends at your server; authorization checks remain your application’s responsibility.
Add your own sign-in dialog
In v0.4, enablePopupSignIn also handles forms marked data-cp-popup. Ask only for the email in your own dialog; leave code entry, provider authentication, passkeys and consent to the operator.
<dialog id="sign-in" aria-labelledby="sign-in-title">
<h2 id="sign-in-title">Welcome to your community</h2>
<form action="/auth/login" method="get" data-cp-popup>
<label>Email address
<input name="login_hint" type="email" maxlength="254"
autocomplete="email" required>
</label>
<button type="submit">Continue</button>
</form>
<a href="/auth/login" data-cp-popup>Other ways to sign in</a>
</dialog>import { enablePopupSignIn } from "@crosspollinate/sdk/browser";
const dialog = document.querySelector("#sign-in");
enablePopupSignIn({
onSignedIn: () => { dialog.close(); location.reload(); }
});
// Open your dialog from a user action with dialog.showModal().For a custom handler, call signInWithPopup({ loginHint: email }) directly from the click or submit event, before any await. The helper trims the hint and drops values longer than 254 characters; the BFF also drops malformed hints.
Set defaultOperator in createBff for a predictable first-time route. The address may select the operator remembered for that address in this browser, otherwise the default or chooser applies. Its email domain is not used for operator discovery, so entering a Gmail address does not select Google as the Crosspollinate operator.
A GET form remains an ordinary redirect when JavaScript is unavailable, provided the page exposes the form. The downloadable example also supplies an ordinary login link when native dialog support is unavailable. Submitting the form does not automatically send a code: the person must confirm at the operator.
Keep the existing BFF and COOP requirements. Never collect an operator code or password in the application’s dialog or embed the operator in an iframe.
The wallet workspace
The independent wallet/ workspace includes the cw-* Rust crates, a server, a CLI and the TypeScript connector. Browser key handling is isolated in a dedicated worker; the wallet server uses PostgreSQL and relays configured chain requests.
| Documentation | What it covers |
|---|---|
| Wallet README | Workspace, building, running, tests and configuration |
| Formats and API | Encrypted material, recovery sheet, device links, server routes and discovery |
| Connector | Application approvals, signatures, transactions, fund transfers and wallet migration |
| Device support and security review | Measured PRF compatibility, trust boundaries and known validation gaps |
| W7 plan | Future batching, sponsored gas and scoped permissions through EIP-7702 |
Protocol surfaces and operational checks
| Surface | Current implementation |
|---|---|
| Standards plane | JSON/JWT endpoints for OpenID Connect, OpenID Federation, did:webvh, credential issuance and presentation |
| Native operator API | /cp/v1: CBOR by default, JSON on request |
| Wallet API | JSON under /api/v1, on the wallet’s own origin |
| Verification | Rust, database, SDK and headless-browser tests; end-to-end demos for federation, credentials, wallet linking and migration |
| Readiness | Project tests do not establish external conformance or an independent security audit. The documented external conformance run remains outstanding. |
The guides document implemented routes directly. An OpenAPI document is not served by the operator. The older v0.1 TypeScript skeleton and earlier site-content ZIP are historical snapshots, not the current implementation package.
Wallet release integrity: current progress
The wallet now has generated asset manifests, a pinned wasm-opt, a served release digest, and the separate cw-verify checker. It compares the delivered pages and assets with a known manifest and checks script-policy constraints.
The first two-person release, published manifests and scheduled public-server verification are still pending. Reproducibility has been checked on one machine, not across all target environments. A checker observes the responses it receives; it cannot rule out targeted code served to a different visitor.
FedCM: proposed, not shipped
The new design document explores a browser-owned sign-in dialog for returning users, keeping the OpenID Connect authorization-code path and using the popup as a fallback. It proposes a separate FedCM cookie and an active, user-initiated flow first.
None of the FedCM proposal is implemented in this source snapshot. Proposed helper names and endpoints are not supported APIs. The next steps are decisions and a browser spike, followed by operator and SDK work. Browser compatibility, registrable-domain constraints and passive modes remain design and validation topics.
Contracts, tests and release checks
| Area | Change or evidence |
|---|---|
| Native wire contract | Corrected optional map-entry syntax in native.cddl; the updated file is included. |
| Repository maintenance | CI build-resource bounds and PostgreSQL TCP-readiness fixes; account-page tests cover bundled and plain-form builds; parallel SDK lookup tests no longer assume request order. |
| Dependency update | curve25519-dalek updated to 5.1.0 in the source. This is maintenance, not an external audit. |
| Checks run for this release | Seven focused SDK popup tests passed, including origin filtering, blocked-window redirect, close/session fallback and login-hint propagation. Site links and package file hashes were also checked. |
| Not rerun here | Full Rust/SDK CI, headless-browser integration, real Google/Apple sign-in and production operator or wallet tests. FedCM remains a design proposal. |
The package includes release notes and a validation record. A new working-draft label does not imply production readiness or independent security review.
How it fits together
These supplied diagrams show the test deployment’s hostnames. They describe the federation, the operator’s internal architecture and the sign-in flow.
The federation
Signed trust connects independent operators and applications. Operators exchange offers, migrations and discovery messages directly.

Inside an operator
A Rust composition root connects use-case crates, storage and external adapters. PostgreSQL implements the storage ports.

Earlier documentation snapshot
The previously published ZIP contains the September v0.2 site text and architecture diagrams. It is retained for reference and does not include the current Rust workspaces or the latest wallet documentation.

