oficina / home Public
🤖 The smart door: remember how you last signed in
Status: APPROVED by Paul, 2026-11-19 (r2, with option (a)). Build in the order below. Author: Claude (Opus 5.5), for Paul. Reviewed: Fable (claude-fable-5-2), r1: READY AFTER FIXES. r2 applies every finding. Paul ruled the §4 question (a).
The ask and the rulings
Paul, 2026-11-19: "Can we level up our ID flow? Inspired by e.g. Tito and Eleven, there should be a smart sign in screen that remembers the last signin method used."
Paul's three rulings, picked the same day:
- Remember the address too, sealed. It lives in a cookie on the person's own device, sealed so only that host can read it. It is never kept at rest on any server. The door shows it back only to that browser. This amends Home's one rule (see "Home's one rule" below).
- Methods are the ones we have: passkey, emailed link or Keymail, and Oficina ID. No Apple or Google sign-in, which would need its own spec.
- Slice 1 is the web: id.oficina.works plus estilo's door, the sign-in page every app shares. Native sign-in sheets come later.
What already exists (most of it)
- rastrillo has shipped a remembering sign-in screen since v0.27 (2026-09-28, plan
rastrillo/docs/superpowers/plans/2026-09-27-signin-screen.md, copy approved in copy review).auth.Config.SigninScreenturns it on.lastsigninkeeps the way in (keymail, magic link or passkey) plus the address, in a sealed, host-only, HttpOnly cookie that lasts 400 days. The cookie is bound to its origin, renewed on every sign-in, and kept on sign-out.auth.Forgetis the "Use a different email" button. Theuipartialsignindraws these doors: ask, link ("Continue as {address}"), keymail, passkey ("Sign in with your passkey" first), sent, confirm and continue. The cookie is never evidence of anything: a one-tap posts the address toBegin, which checks it from scratch, and the screen consults no store, so it can't reveal whether an address is known. - Of the suite, only Equipo has it turned on. Every other app draws estilo's door (
chrome.SignIn), which is a bare email form. Docs, Sheets, Slides, Calendar, Calls and Memoria pin rastrillo v0.27.1 to v0.29.2; Fichas and Mapa pin v0.35. All of them are new enough. - Home (id.oficina.works) has its own sign-in, not rastrillo
auth, because Home is blind. It shows a passkey button once script runs, then the email form. It remembers nothing. - Docs with Home configured sends
/signinstraight to Oficina ID. The email form is at/signin/local.
So most of the level-up is adoption. Two pieces are new: Oficina ID as a remembered method, and Home remembering for itself.
What each door shows
One way in per screen (Paul, 2026-11-19: "We shouldn't offer two options on the same screen. One option, and below it 'other ways to sign in'"). The door shows the method used last on this browser as its single primary action. Below it is a quiet link, Other ways to sign in. Nothing labels the remembered method as last used: being the one on offer is the cue (Paul, same day: it "can easily be inferred"). Unless marked new, all copy is rastrillo's approved copy.
Other ways to sign in is a page of its own, not a disclosure, so it needs no script. It is a chooser: a short list of rows, each opening a one-option screen for that method, plus Back. Use a different email moves there as the last row. It forgets this browser's record (Forget) and opens the email field.
An app's door (Docs shown; any app with Oficina ID configured):
| Last used here | The one option | Other ways lists | |---|---|---| | nothing | new Continue with Oficina ID | Email | | Oficina ID | new Continue with Oficina ID. Never captioned with an address | Email ({address}, if this app resolved one) · Use a different email | | emailed link | Continue as {address} | Oficina ID · Use a different email | | Keymail | Continue to Keymail, as {address} | Oficina ID · Use a different email | | (Email chosen) | Continue as {address} if one is remembered, else the field · Continue | Oficina ID |
The chooser's email row is Email, with the remembered address as its second line. It opens the email screen, where Begin classifies the address as it does today (Keymail or a link). The row doesn't promise either one.
An app without Oficina ID configured has only email. It shows "Continue as {address}" or the field, and under it Use a different email takes the place of the Other ways link.
id.oficina.works (the brand is "Oficina ID"):
| Last used here | The one option | Other ways lists | |---|---|---| | nothing | Email field · Continue. The field offers saved passkeys as autofill (WebAuthn conditional UI, autocomplete="username webauthn"), so a passkey holder never needs the list | Sign in with a passkey | | passkey | Sign in with your passkey | Email ({address}, if kept; see "The cookie") · Use a different email | | emailed link / Keymail | Continue as {address} | Sign in with a passkey · Use a different email |
For someone who has enrolled a passkey, email on id.* still ends at the passkey or a recovery code (slice 1: email alone isn't enough after enrolment). The door can't know who has enrolled without consulting a store, which it must not do. So the Email row stays neutral, and the gate explains itself when it is reached.
How the buttons look (Paul, 2026-11-19, option A of four). Every button on the door is a pill, as in Fichas' level-up: lit from above, with the primary's shadow tinted by its own accent. Continue with Oficina ID uses the app's own accent. Its icon is the Oficina mark's glyph alone, the two fanned cards, drawn in currentColor. It is never the full-colour app icon, whose gradient tile fought the button's fill. estilo ships the glyph (an inline SVG in the door template, so no request and no flash). The pill shape is the door's, not yet the suite's: a suite-wide switch is a separate estilo decision.
The smaller controls (Paul's review of the mockups, 2026-11-19):
- Other ways to sign in, Back, Use a different email and Forget me on this device are text buttons, not thin underlined links, and a clear step below the primary. They are medium weight, in the muted text colour that darkens on hover, slightly smaller than body text, with a chevron where they move you on or back and a soft pill on hover and focus. Semibold in full-strength text was tried and was too bold.
- The chooser's rows are compact: 48px for a single line, with the remembered address as a small second line. Every icon in them is a one-colour glyph, the Oficina one included.
- One focus ring, not two. rastrillo draws a field's grey edge, then a 2px accent outline 2px outside it, which reads as a double border. On the door, the edge itself turns accent with a soft halo flush against it. The same double ring is on every rastrillo field in the suite, so fix it in rastrillo's tokens rather than only on the door, as part of step 1.
Nothing else on the card. The door carries no footer links. Docs, Slides, Calls, Memoria and Mapa put a Colophon link there on 2026-10-26 through estilo's SignIn.OpenSource slot. Nobody ruled that, and Paul, 2026-11-19: "That makes no sense at all." The Colophon stays under Help. The slot is removed from estilo, and each app drops it as it moves to the new door.
What changes in rastrillo's screen. Today its passkey door and ask door show the passkey button and the email form together, separated by "or", and its remembered doors end with a ghost "Use a different email" button. One-way-in becomes a separate config field, default off (SigninOneWay, or a better name in review), so Equipo and rastrillo's other users keep today's screen. It draws the single option plus Other ways, and the chooser is a new Step. The federated slot is page-supplied, like Passkey: an href and a label (Federated{Href, Label}). Equipo, which today appends its own Home button under the partial, moves into that slot when it opts in. Door() keeps "a passkey is never the only way in" by construction: the email way is always one tap away in the chooser.
Signed out (every app): "You're signed out", Sign in again, and a quiet new Forget me on this device, which posts to Forget for a shared computer. connect's signed-out PageData and estilo's estilo-signed-out each gain that second POST form. Each host forgets separately, so a Home-derived app chains to id. after its own Forget: the app's signed-out page links to https://id.oficina.works/forget?return=<its own signed-out URL>, which shows one button, new Forget me on Oficina ID too (a same-origin POST), and a quiet new Not now link back. After forgetting, id. returns only to a URL whose origin is a registered consumer (HOME_CONSUMERS) and whose path is exactly /signed-out; anything else lands on id.'s own signed-out page, which offers its own Forget. (Sign-out itself never passes through id.'s signed-out page: the consumer hop lands on the app's own, so the chain starts there.) Apps add the link in step 6. Forget's request-forgery protection is unchanged: csrf.SameOrigin in apps and csrf.Protect on Home. The worst a forged request can do is forget.
Routes, and every state the door must answer (r1 finding 3, 5, 6, 7, 11, 14, 18):
/signinalways renders the door. The query dispatch that sent a bare/signinto Home (connect'sRoutes.Signin, Docs'homeRoutes.signin) is deleted./signin/local, where connect sends unknown, failed, link-resume and choose-declined people, renders the door with email as the one option: never Oficina ID, which would loop. Continue with Oficina ID isGET /signin/oficina?return_to=…. It does today'srememberReturnplushandoff.StartPath.- Chooser and override:
?ways=1renders the chooser.?way=email|passkey|oficinarenders that method's one-option screen. The override picks a method, never an address: the address only ever comes from the sealed cookie or the field. Every chooser link, Back, and the Forget form carryreturn_to. - Problems win. Any
err(including Keymail's), a rate limit, orforce=1renders the email door with the field, keepsforce, and shows the problem.sent,confirmandcontinuerender as today: no chooser, and Sent keeps "Use a different email". - App refusals (Docs' in-response "refused", via
Config.Refused) get a slot: an app-supplied problem (text, plus "force the ask door") in the partial's keys. Without it, a refused person would see "Continue as {old address}" and no message. - Reauth (
?reauth=1, or a fresh-auth step-up) offers a local method only: email in apps, and passkey or email on id.. A live id. session would hand back an oldauth_time, and connect's link flow needsFreshLocal. - Base path: with
SigninState.Unavailable,estilo-signin-screendraws nothing, and the app answers as it does today. - *id. specifics: a
Beginfailure after "Continue as" re-renders the field door, prefilled from the cookie. Sent stays address-free, as Home's is by design.?force=1after a failed Keymail return is the field door with force kept. The chooser, Back and Forget are served on routes that don't callrememberReturn*, or carryreturn_toexplicitly. A test walks app → id. → Other ways → passkey → back in the app.
The returning path for an Oficina ID user on an app: tap Continue with Oficina ID; id.oficina.works opens on Sign in with your passkey; one touch; back in the app. If an id.* session is still alive, there is no door at all: straight back in the app (Paul's ruling 2026-11-20, which retired the Continue page; slice 1 spec, Assertion and browser exchange, step 2).
The cookie
It is lastsignin's cookie, unchanged in format. Every host keeps its own, because a parent-domain cookie is ruled out. Docs on paulca.docs.oficina.works and id.oficina.works each remember for themselves. That is what we want: each door reflects how that door was last used.
Changes to lastsignin:
- A federated method:
MethodFederated, with a closed, app-setProviderlabel ("oficina") thatvalidRecordchecks against a closed set. rastrillo stays generic, and the label names nothing about the person. - No address carry-over (r1 finding 2; rastrillo's
passkey.goalready refuses it, because "keeping the old address would label one person's passkey sign-in with another's name"). A record only ever holds the address of the person who just signed in, or none: - Apps: the federated record is written in the app's ownMintHomeSessionhook, never inconnect. The app callsRememberJar().Rememberwith the address of the local account it just resolved, or with none. It is written only on the session-minting path (Bridge.complete→mintSession), never on link, choose, unknown or failed.connectstays free oflastsignin, so its consumers aren't forced onto a new rastrillo minor. - *id.: a passkey sign-in keeps the remembered address only if that address's blind index resolves to the same person ref* as the passkey's subject, checked at sign-in time. Otherwise the address is blanked. A finished passkey gate (idFinish("signin")) records passkey*, so an enrolled person who used email and then their passkey is offered the passkey next time. - API:
Rememberneeds the address supplied by the caller, as above.AttemptCookiebecomes optional, because Home has no attempt cookie. Old binaries read new records as Invalid and clear them, so a rollback is safe.
The jar on id.oficina.works is built with lastsignin.New directly. Its instance key is derived from HOME_DEK under its own label (home/lastsignin/v1). seal.Sealer gains a small domain-separated derive method for that. The origin is https://id.oficina.works.
Home's one rule
Rastrillo's blind mode turns off address-remembering cookies on purpose, because Home's rule is "never stores a readable address". Paul's ruling 1 allows the following, and nothing wider. It becomes Home ruling 26, recorded in the design spec's §1 table and in AGENTS.md's gloss when this lands:
> Home may seal the address this browser last proved (an opened link, a > Keymail callback) into a cookie on that person's own device, and render > it back only to the browser that presents it, on a no-store page. It > is never written at rest by Home: not to the database, a log, an error, a > metric or a queue. It is not evidence of identity, and the page that shows > it consults no store.
The falsifiable form is unchanged. Publish Home's database in full, and nothing in it is a readable address.
The gates (r1 finding 12). Gate 9 is driven with a validly sealed cookie whose address is a canary, across every route, and asserts the address appears in no log line. The cookie's name isn't secret, and its ciphertext differs on every seal, so neither is a useful canary. The sign-in half of gates 1 and 2 also loads the door afterwards and re-scans the DB, WAL and store objects. Before shipping, confirm the carlos edge logs neither Cookie headers nor response bodies.
§4 and gate 5 are amended by ruling 26 (Paul chose option (a), below). The credential origin may render exactly one person-supplied string: the address Home sealed itself, under the limits in (a).
What this costs, stated plainly: anyone using that browser sees the address, and so does anyone holding the cookie, who can load the door with it. "Use a different email" and "Forget me on this device" are the answer. Rotating HOME_DEK forgets everyone, which is harmless: the cookie reads as Invalid and is cleared.
Script, flashes and layout
- Every door works with script off, except passkeys, which need their ceremony script (ruling 25).
- No pop-in on a remembered passkey. Today rastrillo writes the passkey button
hiddenand the module reveals it. On the passkey door, where the button is the primary, that moves the page after load. On that door alone, the button is drawn visible and disabled before enhancement, with its space reserved; the module enables it. If enhancement fails (noPublicKeyCredential, the import fails, oravailable()is false), the module doesn't return silently: it writes the status line and moves to the email screen. With script off, a<noscript>line says passkeys need JavaScript, and Other ways sits right below it.disabledis used only before enhancement, never as the busy state (it drops focus). Home's script-stripped gate (§12 gate 6) andnoscript_test.goallow-list the visible button. - Conditional UI on id.* (passkeys offered in the email field's autofill). It runs only when
isConditionalMediationAvailable()is true, and never whereLegacyRPIDis set (Home's is empty). AnAbortControlleraborts it when the form submits. The conditionalget()can outlive the five-minute__Host-oficina-ceremonychallenge, or another tab can replace it, so a refused finish re-begins and retries once. Any failure falls silently back to the field. This needs amediation/signalparameter in rastrillo'swebauthn.mjsauthenticate. - Home renders the shared partial. id.* fills an
auth.SigninStateitself and renders rastrillo'ssigninpartial, instead of hand-rolling templates that would drift. Its passkey finish answers in rastrillo's shape ({"ok": true, "to": …}), so one passkey glue serves both. - No new font and no icon font (never FOUT).
The work, in order
- rastrillo:
MethodFederated+Provider, theRememberAPI change (no carry-over), the one-way option and its chooserStep, theFederatedslot, the app-problem slot, the passkey-door no-shift and failure path,webauthn.mjsconditional mediation, the single focus ring in tokens,sealderive, and the new strings. Browser drives and axe run on every new state, as for the existing ones. Release as a minor version. - estilo:
estilo-signin-screen, rastrillo'ssigninpartial inside the door chrome (sky, card, app mark), template-only and duck-typed. estilo's go.mod stays on the old rastrillo path, so its tests render a fixture. It draws nothing when Unavailable. The Oficina glyph is inline. The signed-out page gains Forget. TheOpenSourceslot is removed.estilo-signinstays for apps that haven't moved. - Home to the new rastrillo, as its own step: v0.26.1 to the step-1 release, with AGENTS.md's ritual (
doctor --fix, delete the shims, the vendored tokens.css gate).connectdoesn't importlastsignin. - Home connect: the
/signin,/signin/localand/signin/oficinaroutes above, and the signed-out page's Forget form. - Home id.oficina.works: the jar, the doors through the shared partial, the same-person check, conditional UI, the
{ok,to}passkey finish, ruling 26 (once the open question is answered), and the gates. - The apps, Docs first, then Sheets, Slides, Calendar, Calls, Memoria, Fichas and Mapa. Each one turns
SigninScreenand the one-way option on, rendersestilo-signin-screen, bumps estilo and rastrillo, remembers the federated record in its ownMintHomeSessionhook, and moves its refusal text into the app-problem slot. Equipo moves its screen into the door chrome and its Home button (oficina_id.go) into the federated slot. - Later, native: the kit's sign-in sheet reads the last-used method from the App Group, which already holds the last-used (identity, team).
- Later, native: the kit's sign-in sheet reads the last-used method from the App Group, which already holds the last-used (identity, team).
Reviews follow the Amadan workflow, with a Fable (or Astra) review before each merge. New copy goes through copy review.
Ruled: the address on id.oficina.works, option (a)
Paul, 2026-11-19, picked (a). Ruling 26 includes this §4 and gate 5 carve-out. Both are amended in the same commit that lands ruling 26.
Home's design §4 says the credential origin (id.oficina.works) shows "No account-authored string, ever", and gate 5 tests it. Today's passkey page withholds the address for exactly that reason. "Continue as paul@tito.io" on id.* would be the first such string.
- (a) Allow it, narrowly (recommended). Amend §4 and gate 5 for exactly one string: an address Home itself sealed. It is shape-checked again on read (
lastsignin.validAddress), escaped by html/template, and appears only as text and in a hiddenvalue. An attacker can't forge the cookie withoutHOME_DEK. Whatever it says is something this browser proved. Thepasskey.gocomment changes in the same commit. - (b) Keep §4 absolute. id. remembers the method only. The email screen shows the field, and the browser's own autofill supplies the address. App doors still show "Continue as {address}"; only id. doesn't.
Paul's answers (2026-11-19)
Paul: "Happy with recommendations. Remove now."
- Docs shows the door.
/signinstops hopping straight to id.oficina.works. It shows the door with Continue with Oficina ID as the one option. - Forget me on this device goes on the signed-out page.
- The Colophon link comes off the live doors now, ahead of this work, in Docs, Slides, Calls, Memoria and Mapa. estilo's
OpenSourceslot is removed later, with the rest of step 2.