Skip to content

fix(control): cap login lifetime and expose safe session revocation - #258

Merged
abruption merged 5 commits into
mainfrom
abruption/v103-issue-234
Oct 5, 2026
Merged

abruption merged 5 commits into
mainfrom
abruption/v103-issue-234

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

Cap browser and device-login Control sessions at 24 hours from creation, without activity refresh. Cap existing sliding rows at startup without extending earlier expiry. Add metadata-only account session listing and ID-based revocation, document separate device/login revocation, and surface stored-login 401 as login_expired.

Closes #234

Type

  • fix

Checklist

  • Pinned Better Auth/SQLite and actual device-flow regressions.
  • Owner isolation, exact error/method/Origin/header contracts and legacy-date behavior.
  • Four-language documentation and i18n hash checked.
  • Real browser interaction against synthetic loopback app/web build; no production accounts/OAuth.

Verified against

Node 24.16.0/Better Auth 1.7.5, Python 3.13.7, macOS arm64: independently ran typecheck/build and the complete Control suite (102 tests in 15 files), plus i18n tests. The isolated browser fixture verified list, confirmation cancellation, individual/other/all revocation, invalidated-session 401 guidance and revoke-all redirect to login. Synthetic cookie and owned server were cleaned up.

Independent read-only review led to additional tests for malformed/legacy dates, claim-present revocation, exact denial/routing and response headers. A pinned-handler fixture demonstrated bearer authentication could emit signed credentials; Authorization-bearing auth responses now strip set-cookie/set-auth-token, preserving genuine cookie responses. The regression exercises the resulting cookie/device-flow boundary.

Notes

Cookie + Origin/Fetch Metadata checks are transport safeguards, NOT proof of human presence or cryptographic device binding. One account login can manage multiple devices; users must revoke login and device separately. Unsupported numeric or malformed stored dates fail closed and may require immediate login after upgrade. Browser sessions also expire absolutely at 24 hours.

No production deployment, real OAuth login, live message/ACK, service restart or 24-hour real-time soak performed. Draft only; no merge/release authorization.

@abruption abruption added this to the v1.0.3 milestone Oct 3, 2026
@abruption

Copy link
Copy Markdown
Owner Author

Review follow-up implemented in efdc9bec and translation-manifest correction 500b7a2.

Browser session listing/revocation uses its own bounded 60/user/minute budget and 4096 buckets, independent of CLI relay traffic. Pinned Better Auth fixtures exhaust the CLI budget, successfully list/revoke that same owner's leaked login from the browser, and then observe bearer rejection. Browser quota limits and reverse isolation remain enforced. Cookie/Origin/ownership guards and token-free metadata are unchanged.

Verified: full Control typecheck/build, 104 tests across 15 files, and documentation/i18n checks. Both budgets remain process-local; authenticated cookie traffic can exhaust its own budget. No real OAuth or production changes; draft retained.

@abruption
abruption merged commit 500b7a2 into main Oct 5, 2026
28 checks passed
@abruption
abruption deleted the abruption/v103-issue-234 branch October 5, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(control): cap device-login session lifetime and let users revoke other sessions

1 participant