exoDocs
Decisions (ADRs)

Decisions and roadmap

ADR 0025: The Imprint card: native feel, Exo origin

  • Status: accepted
  • Date: 2026-11-03
  • Decided by: Samir (owner), 16:42 EST: every sign-in says "Sign in with Exo Imprint"; one standard like Sign in with Google, but native to the app you are on, with fixed Exo elements that show Exo Trust authored and signed the card.
  • Amended: 2026-11-03 21:15 EST (Samir), v0.14.1; see Amendment below.
  • Builds on: ADR 0004 (Exo is the identity provider), ADR 0021 (names: Imprint is the sign-on)

Context

Sign-in looked different on every app (docs/design/imprint-signin-audit.md): "Exo Key", "Exo ID", "Exo" and "Exo Imprint" for the same step, four button styles, and an Exo page that ignored the app the person came from. Samir wants one standard that feels native to each app.

Two ways to get "native": draw the sign-in inside the app (an embedded form or iframe), or theme Exo's own page per app. Embedding puts credential entry on a page Exo does not control, which teaches people to type credentials wherever an Exo-looking form appears (phishing) and lets a host page overlay or trick clicks (clickjacking).

Decision

  1. Credentials are entered only on the Exo issuer origin (/id/authorize on exo.now or staging.exo.now). The address bar is the proof. /id/* is never framed: frame-ancestors 'none' and X-Frame-Options stay. No SDK draws credential fields inside an app.
  2. Native feel comes from a per-app theme on Exo's card, declared in the registry (EXO_ID_APPS[app].theme): display name, same-origin logo, accent, light or dark, optional radius (0, 4, 8, 12). Validated strictly (convex/lib/imprintTheme.ts): the accent must pass WCAG AA (3:1 on the card, 4.5:1 under text) or Exo's accent is used; logos come from /imprint/apps/ on Exo's origin (CSP img-src 'self'); no custom CSS, HTML or fonts; type is the Structured Liquidity scale. A theme applies only after the request passed registry validation; invalid requests get the plain Exo card.
  3. A fixed Exo Trust strip on every card: the Exo seal, "Signed by Exo Trust", and the verified return domain (the host of the exactly matched redirect_uri). It pins Exo's own tokens and reads no theme variable, so no app can restyle, hide or imitate it inside the card.
  4. One card, steps in place. Choose a method, phone and code, progress, consent (agents), done, and every error or expired state morph inside the same card with Structured Liquidity's liquid motion (none under prefers-reduced-motion), with focus moved to each new step.
  5. One entry button, "Sign in with Exo Imprint", that apps place on their own pages: a plain link to the app's own sign-in start route. Fixed label, seal and shape; apps choose size, light or dark, and width (ExoImprintButton, packages/exo-app-sdk/imprint-button/).
  6. Copy: sign-in screens say "Exo Imprint". "Exo Key", "Key" and "Key" do not appear on them; Key stays the developer key product (/id/keys).

Consequences

  • OIDC behavior, routes, params and tests are unchanged; this is presentation only.
  • The card follows the app's light or dark choice, not the visitor's OS theme; the first byte is already the right theme, so nothing flashes.
  • A new app's look is a registry change Exo reviews, not code the app ships.
  • Remote logo hosts need both an IMPRINT_LOGO_HOSTS entry and a CSP change; none today.
  • Exo's CSP on /id/* is still report-only; enforcing it (so frame-ancestors 'none' is enforced rather than only X-Frame-Options: SAMEORIGIN) remains a separate step.

Amendment (2026-11-03 21:15 EST, Samir; v0.14.1)

  • Decision 3 changes. The "Signed by Exo Trust" wording and the black trust strip are gone: Samir found them confusing and unnecessary. In their place is a quiet footer, the small Exo Imprint mark and the verified return domain ("Exo Imprint · returns you to cosmograph.space"; "Exo Imprint" alone when there is no verified domain). It is still fixed: it pins Exo's light tokens and reads no theme variable (ImprintFooter, .footer in src/components/ExoKeySurface/styles.module.css).
  • Framing is now enforced on /id/*, ahead of the full CSP rollout. Every Exo Imprint page (/id and below: authorize, device, keys, and the connect and error states they render) sends an enforced Content-Security-Policy: frame-ancestors 'none' beside the Report-Only policy, and X-Frame-Options: DENY instead of SAMEORIGIN (nothing same-origin frames these pages). The enforced header comes from the static Next config, not the proxy, so Next.js keeps reading the nonce from the full policy. The other directives on /id/* stay Report-Only until EXO_CSP_MODE=enforce (see docs/security/exo-csp.md). This replaces the last Consequences bullet above.

Amendment 2: the in-page window (2026-11-05 08:25 EST, Samir; STAGING ONLY)

  • Approved by Samir (2026-11-05 08:25 EST): "I think this is okay for now - we'll be very clear what's happening and use some text-masking alongside protection in the fill boxes so we can't be hacked easily." First relying party: Parlour Living on Construct (staging and PR previews).
  • Decision 1 changes, on staging only. Credentials are still entered only into a document served from the Exo issuer origin (staging.exo.now). What changes is who may frame that document: one route, /id/embed, may be framed by an allowlist of registered client origins. Every other /id page keeps frame-ancestors 'none' and X-Frame-Options: DENY.
  • Staging allowlist (IMPRINT_EMBED_STAGING_CLIENTS, src/platform/identity/imprint-embed.ts): for the construct app, https://staging.construct.codes and ^https://pr-[0-9]{1,6}\.staging\.construct\.codes$. An origin must also be a registered origin of the same app, so the allowlist can only narrow the registry. It is honoured only on the staging identity plane (exoIdRegistryEnvironment() === 'staging', i.e. EXO_DEPLOYMENT_ENVIRONMENT=staging with the frugal-eel-930 Convex deployment).
  • Production stays frame-ancestors 'none' (IMPRINT_EMBED_PRODUCTION_CLIENTS is empty) until Samir says yes. On production /id/embed renders a "not available here" card and is unframeable.
  • Headers. /id/embed always gets an enforced Content-Security-Policy, built per request in the proxy with the nonce (imprintEmbedCsp, src/proxy.ts). frame-ancestors is exactly one origin, the origin of the registered redirect_uri, when the request passes validation and the allowlist; then, and only then, X-Frame-Options is omitted. Production, invalid requests and the Google popup get frame-ancestors 'none' and X-Frame-Options: DENY. The static frame-ancestors 'none' rule now covers /id/:path((?!embed(?:/|$)).*)?.
  • What the frame shows. The Imprint card in a compact layout with an always-visible origin line, "Secured by Exo Imprint · exo.now" (staging.exo.now on staging), pinned to Exo's tokens like the footer. It names the relying app only from an allowlisted label (client=parlour shows "Parlour"). Methods: Google (a real top-level popup on Exo's origin, because Google cannot be framed) and phone code. No email codes, no GitHub, no new passkeys in embed mode.
  • Fields. Phone and code are masked to their last two digits, autocomplete="one-time-code" and inputmode="numeric" on the code, no login_hint, nothing in URLs or logs. Phone codes keep the existing server-side rate limits (phoneAuthRateLimits, convex/rateLimits.ts).
  • Frame-busting fallback. The card draws no field until it has checked, in the browser, that its direct parent is the registered origin (location.ancestorOrigins, else the referrer); otherwise it refuses to render. The enforced frame-ancestors is the real gate.
  • Completion. The frame posts only { code, state } to window.parent with targetOrigin set exactly to the registered origin. Tokens never leave Exo; the relying party redeems the code server-side with its PKCE verifier. Contract: docs/imprint-embed.md.
  • Accepted risk. A framed card can be overlaid by the host page (clickjacking) and teaches people that an Exo form can appear inside another site. Mitigations: an exact, reviewed allowlist (Exo-operated sites only today), the visible origin line, masked fields, Google in a top-level window, codes bound to the registered redirect_uri and PKCE, and staging only.
  • Construct's contract (2026-11-05, construct pr-469): /id/authorize?embed=1 is the embed screen too (the static 'none' rule on /id/authorize is skipped only when embed=1), and the only message is { type: 'exo:imprint:code', code, state }. frame-ancestors stays the exact per-request origin rather than the pr-* wildcard list, which CSP does not support (docs/imprint-embed.md).

Amendment 3: Parlour's flat card, email + phone (2026-11-05 18:04 EST, Samir; STAGING ONLY)

Samir reviewed the embedded card inside Parlour's residents page and asked for a redesign. It is per-client, per-app config (profiles on the staging embed allowlist, src/platform/identity/imprint-embed.ts), so every other app and property (Cosmograph and the rest) keeps the standard card and its current methods.

  • Parlour = email + phone, no SSO. For Construct with app_name=Parlour (or client=parlour) the card offers an email address or a phone number only. Google and GitHub are hidden, and the server refuses popup=google for this property. This reverses amendment 2's "no email codes" for Parlour on staging only. Email codes are Exo's own (convex/emailAuth.ts, Bird email via convex/lib/birdEmail.ts), built on the phone-code machinery: 10-minute codes, 5 attempts, one live code per address, per-address cooldown and hourly cap plus a global cap (emailAuthRateLimits), salted hash only, code never logged. Allowed properties live in convex/lib/imprintEmailCodes.ts; production has none. Email-code-only accounts never hold a privileged role (emailCodeOnly, like phoneOnly).
  • One flat card. No nested containers or boxes inside boxes, no page grid or glow, no navigation out of the frame; every step (choose, enter, code, progress) stays in the same card and frame. On success the postMessage contract is unchanged: { type: 'exo:imprint:code', code, state }.
  • Copy rules (Parlour).
    • Heading "Secure sign-in", with the Exo Imprint mark and wordmark on the right of the header row.
    • Body: "You're signing in to the Parlour Living Residence Portal using Exo Imprint, Parlour's identity provider."
    • Transport line, which must stay literally true: "Your details are encrypted in transit with TLS 1.2 or newer." Verified 2026-11-05 with openssl against staging.exo.now, exo.now and frugal-eel-930.convex.cloud (where the fields are sent): TLS 1.0/1.1 refused, 1.2 and 1.3 accepted, cipher chosen by the client's preference (TLS_AES_128_GCM_SHA256 for a browser-style offer). So "TLS 1.3 with 256-bit AES" is not claimed, and ES256 (a signing algorithm, not encryption) is never named. Re-verify before changing the line.
    • One sub-label: "Choose how to sign in". Actions: "Email me a code" and "Text me a code".
    • Removed for Parlour: "Secured by Exo Imprint · staging.exo.now", any Construct or "Construct staging" header or logo, "Sign in to Construct", "Sign in with Exo Imprint", any "Exo Key", and "Residents only".
  • Honest failure. When Bird is not configured on the deployment, the email request returns unavailable and the card says email codes are not available; it never pretends a code went out.

Amendment 4: the Imprint slot on registered Surfaces (2026-11-15 09:57 EST, Samir; STAGING ONLY)

  • Approved by Samir (2026-11-15 09:57 EST): Exo Imprint absorbs most of the identity layer, above Construct; route name /imprint; change Exo's staging framing rules so the Imprint card can be framed inside the slot on registered Surfaces, with no full-page fallback needed; the module approach; the personal stamp. Design: docs/imprint-platform.md.
  • New route /imprint/slot, served from the Exo origin. Same validation as /id/authorize, plus a surface the relying party registered and a parent_origin that is one of that Surface's origins. On staging, a valid request gets an enforced CSP with frame-ancestors <parent_origin> and no X-Frame-Options; everything else gets frame-ancestors 'none' and X-Frame-Options: DENY.
  • Decision 1 changes again, on staging only. The framing parent no longer has to be the origin of the registered redirect_uri. It may be any origin of a Surface that the relying party lists in its manifest (/.well-known/exo-imprint-surfaces.json on its registered origin), within Exo's own per-relying-party bound (IMPRINT_SLOT_STAGING_BOUNDS: for construct, staging.construct.codes and one label under it). The code stays bound to the registered redirect_uri and PKCE, so the framing page cannot redeem it; only the relying party's server can.
  • Grants live in Exo (imprintGrants, per person + relying party + Surface), recorded at the first Continue and listed on the Imprint account page, where they are revoked. Codes carry the Surface key.
  • Production unchanged: IMPRINT_SLOT_PRODUCTION_BOUNDS is empty; /imprint/slot on exo.now renders "not available here" and is unframeable. Amendment 2's /id/embed keeps working until every Construct path has moved to the slot.
  • Accepted risk is amendment 2's, over more origins: a host can overlay the frame. Same mitigations (exact single origin per request, locked seal, masked fields, Exo-operated hosts only), plus fail-closed when the manifest cannot be read.

Amendment 5: the Exo Imprint card header (2026-11-16 17:00 EST, Samir; STAGING ONLY)

  • Decided by Samir (2026-11-16 17:00 EST, reviewing the one sign-in standard, exo #466/#468): the Exo Imprint card at the foot of every sign-in drops its "Secured by Exo Imprint" label line. This supersedes the 2026-11-15 12:54 EST foot line "[host mark] × [Exo] Secured by Exo Imprint" (amendment 4's locked seal; docs/imprint-platform.md).
  • The card header always reads "[Company name] × [exo imprint lockup]": "Multiplex × exo imprint", "Parlour Living × exo imprint", and so on for every Surface, with the host mark drawn by Exo from validated path data, as before.
  • On Exo's own sign-in (/id/sign-in) there is no host, so the header is the "exo imprint" lockup alone, never "Exo × exo imprint".
  • Kept: the trust statement and its FAQ link, the locked tokens (no theme variable reaches the card), and the personal stamp slot (#437). The card's accessible name keeps the pairing in words ("Multiplex with Exo Imprint"; "Exo Imprint" on Exo's own page).
  • Unchanged: Exo Imprint email subjects, and amendment 2/3's origin line on the older /id/embed card (a different element, retiring with that path).

Amendment 6: THE sign-in template (2026-11-16 17:49 EST, Samir; STAGING ONLY)

  • Decided by Samir (2026-11-16 17:49 EST, after the one sign-in standard, exo #466/#468/#470): one sign-in template for every surface: Exo's own /id/sign-in, Construct sites, and Exo planets (Multiplex, Parlour Living). No project draws its own sign-in. Full spec: docs/imprint-slot-template.md, section 0; code: src/components/SignInStandard (template.ts, Providers.tsx, ProviderIcons.tsx) and FlatShell (src/components/ExoImprintEmbed/FlatCard.tsx).
  • Rows, top to bottom, all left-aligned:
    1. Host identity: the host's icon plus its logo/name (Exo lockup on Exo's own pages).
    2. Verified row under the logo: a small check badge, then "{address} · Verified by Exo Imprint", the address being the host Exo checked plus the full path the Surface is registered at ("staging.construct.codes/multiplex"). This supersedes "Verified site: {host}".
    3. Heading "Sign in to {Company}"; a helper line under it only when the method needs one. This supersedes the 2026-11-16 14:34 method-aware heading ("… with your mobile number"): the helper now names the field ("Enter your mobile number. …").
    4. Provider buttons, each a left-aligned icon then its label: "Continue with Google" (Google G), "Continue with GitHub" (GitHub mark), "Continue with email" (envelope), "Continue with phone" (phone). Official brand marks inline; the same 48px square, ink-bordered, hard-shadow button.
    5. The foot card: "[host icon] {host} × exo imprint", the trust blurb and the FAQ link (amendment 5; the lockup alone on Exo's own page).
  • Variance layer (the only things that change per host): (a) which providers the host enabled, rendered in the fixed order Google, GitHub, email, phone; (b) embedded vs. link-out: email and phone are embedded Exo Imprint steps that open in place with a back control, keeping rows 1, 2 and 5; Google and GitHub link out to the provider's own branded consent screen and return.
  • Proposal, not yet decided by Samir: when a host enables exactly one method and it is embedded (Multiplex and Parlour today, phone only), its field shows directly, with no button first.
  • Slot limits today: the slot offers email and phone only. Google and GitHub in a framed slot need the popup flow (amendment 2) and are not built; Exo's own /id/sign-in offers all four.
  • Manifest: an optional Surface path ("/multiplex") feeds the verified row; without it Exo uses Construct's convention /{surface key}. The origin is what Exo's frame check proves; the path is the Surface's registration on that origin.
  • Production unchanged until Samir approves it.

Source: docs/adr/0025-imprint-card-native-feel-exo-origin.md

On this page