oficina / docs Public

A native Oficina ID session can't approve the browser sign-in (7-day renewal hole): landed 0250ef1, NOT deployed open

On branch fix/native-session-no-approve

Opened after the merge — squash-merged as 0250ef1 before this discussion existed, against this repo's rule.

Hole (confirmed by probes, production Docs). Docs mounts rastrillo's older nativeauth browser-approval flow with h.requireCurrent, which accepts any Home-derived session. Its exchange mints a copy of the approving session with a fresh created_at, so a native session (home-assertion-native, home-native-web) six days in could approve itself a new 7-day session indefinitely with no Home grant — defeating Sign out all devices. Found by Fable on the equivalent Sheets branch.

Fix. nativeApprover refuses native/native-web (or absent) sessions on authorize and on the exchange's re-check, with the same plain-text 401 a signed-out approval gets; streams and sign-in return unchanged. native_approval_test.go (Home native, Home native-web, team native) fails without the fix; a browser session still approves.

Review. Claude Fable: APPROVE. Notes: (1) MEDIUM, pre-existing, in rastrillo native/server: any approving session (browser, magic-link) renews past its 30-day TTL the same way — to fix once in rastrillo; (2) the refusal is a denylist — consider an allowlist; (3) test gaps (team / magic-link "still approves" controls). Hub CI passed at 765e75b.

Deploy: held until Paul runs alta-adopt Plan C (a served-release change would park Docs' activation on artifact-mismatch).