More from Paul (2026-11-17, phone): during Oficina ID sign-in the 'Continue to the app' hand-off screen (/authorize/resume) looks bare and feels unnecessary. Please make the hand-off automatic where it's safe (e.g. auto-submitting the hand-off form, or a same-origin redirect), and give any remaining step the same Oficina card style as the sign-in page. Goal: one sign-in, no extra screens.
Signing in to an app takes several sign-ins and a Continue open
Paul, 2026-11-17, on his phone: opening an Oficina app meant signing in at oficina.works, landing on the app list (apps show 'Not connected to Oficina yet', expected before adoption), then signing in again for Calendar, pressing Continue, and signing in a third time. No errors in the logs; the edge shows only successful requests. Expected: one sign-in at id.oficina.works carries across the directory and every app, with at most a silent hand-off. Please trace the flow (directory /auth/start -> id /authorize -> /authorize/resume -> app) on a phone browser and find why the id session isn't reused.
Likely cause of the repeated sign-ins, from reading the code: Oficina ID sessions last 30 days, but the directory asks for max_age=300 on every authorize (internal/home/directory.go:84), and exchange.go:115 then sends the person back to /signin unless they signed in after that request started, even with a valid session. So oficina.works always forces a fresh sign-in, on top of the app's own hand-off. oficina-connect does the same through RequireFreshAuth (connection/server.go). Fix to consider: reserve fresh sign-in for genuinely sensitive steps such as operator confirms, and let ordinary directory sign-in reuse the 30-day session.
🤖 Finding from the canary (overnight pair on v0.1.0-180-g81c743c), 2026-11-19. Read-only: logs, carlos db query on the replicas, and the code. No sessions were faked. Claude Opus 5.5.
The ID session works
- Cookie (rastrillo v0.26.1
sessions/sessions.go:112-124;internal/home/app.go:121-127):__Host-rastrillo_session, host-only with no Domain,Path=/,Secure,HttpOnly,SameSite=Lax,Max-Age30 days. - Who reads it:
/authorizereads it without a guard. It hashes the cookie into the intent'sPrevious(exchange.go:79)./authorize/resumesits behindsessions.Require(app.go:229-230). - Paul's browser kept and returned it. The credential's
sessionstable holds exactly two sign-ins today: 10:54:41 and 10:55:05, both Keymail. The second revoked the first.SignIndoes that only when the old cookie arrives with the request (sessions.go:202-207).
What the two ID sign-ins were: both for Docs
The two Home assertions overnight-docs received today were issued at 10:54:42 and 10:55:05 (its oficina_handoff_replay). Its own sessions table gained a keymail session at 10:54:51, which is Docs' own sign-in. So the first app cost three sign-ins:
- ID sign-in, ordinary handoff. It was needed: this browser had no ID session. Docs has no link for the person, so the member chooses.
- Docs' own sign-in, for "Connect my existing account".
- ID sign-in again, to link.
connect/bridge.go:89starts linking withRequireFreshAuth, so the URL carriesmax_age=300.exchange.go:149then refuses an ID session that is the same session, or authenticated before the link transaction started. Sign-in 1 was both: same browser, about 13 seconds earlier.
That is the spec's own rule, and the slice-1 spec says so: "Linking always requires new authentication, regardless of session age." The guards are link new session and link transaction start in check-id-mutations.py. The rule stops a browser that another site forced into somebody else's ID from linking the person's app account to that ID. This is the "signs in three times" in this issue's first post. It is per app, once, on the first connect. Ordinary /auth/start handoffs carry no max_age, as you found.
Correction to my earlier comment here: directory.go:84 is the fresh-only consumer (/auth/fresh/start), not every directory authorize.
Steps 2 to 4: no sign-in reached the canary
- Calendar. overnight-calendar recorded a pending handoff at 10:55:43; the one at 10:56:52 is my own probe. No callback ever reached Calendar: no inbox or replay rows, and no POST at its edge. The credential minted no session after 10:55:05 and took no POST in 10:55–10:56.
- The other apps. overnight-home, -slides, -sheets and -memoria have no sessions or handoffs today.
- Calendar's build is old. The overnight-calendar route serves
5b9f0b6from channelcanary/overnight-recurrence, a September build that predates slice 1.
So whatever looked like a sign-in at steps 2–4 was not an Oficina ID sign-in, and those handoffs never finished. We need Paul to say what screen each step showed. Rule (b) has not been proven either way.
Proposed fixes (no code yet)
- A. Security rule; needs Paul's ruling. Let linking accept an ID gesture made within
max_agein the same browser, even before the link transaction started: dropsameSessionand theStartedbound atexchange.go:149. The first connect drops from three sign-ins to two. The cost: anyone who forced this browser into their own ID within the last 5 minutes could link the person's app account to it. - B. No security change. On the members-choose page, the app runs its local sign-in and links with one ID sign-in. That is still two sign-ins plus the app's own. Or lead with "I'm new here — continue with Oficina ID", which needs one sign-in.
- C. Bring overnight-calendar up to a current build before judging steps 2–4.