Skip to content
This repository was archived by the owner on Oct 31, 2026. It is now read-only.

Broker 0.9.0: browser binding on every path, standards fixes, standards page - #19

Merged
nicu-chiciuc merged 1 commit into
mainfrom
nicu-standards-fixes
Oct 30, 2026
Merged

nicu-chiciuc merged 1 commit into
mainfrom
nicu-standards-fixes

Conversation

@nicu-chiciuc

@nicu-chiciuc nicu-chiciuc commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes

  • Every authorization request sets the transaction cookie. Before, a first-party request skipped the chooser and also skipped the binding, so its provider callback finished in any browser (RFC 9700 section 2.1.1). txnCookieHash is now required.
  • request and request_uri answer request_not_supported and request_uri_not_supported instead of being ignored (OIDC Core sections 6.1 and 6.2).
  • The issuer must be https, or http on a loopback host (OIDC Discovery section 3, RFC 8414 section 2).
  • Every 401 from /token carries WWW-Authenticate (RFC 9110 section 15.5.2).
  • A parameter sent without a value counts as omitted (RFC 6749 section 3.1).

Less custom code

  • PKCE comes from oauth4webapi, and base64url from jose. component/crypto.ts is gone.

Docs

  • docs/standards.md lists each standard, its sections, and its status. It also lists what is not implemented.
  • README and docs/design.md no longer claim things the code does not do.

Deploying this

txnCookieHash is required, so Convex refuses the schema push while authRequests holds an older row. Run identityBroker:cleanup on the hub just before the deploy. Cleanup deletes only expired rows, so a sign-in from the last 10 minutes can still block the push. A refused push leaves the old code running. Wait 10 minutes, run cleanup again, and deploy again. A staged rollout with an optional field would add a second release and a legacy path, for a hub with very few sign-ins.

Tests

  • pnpm run check: 90 tests pass.
  • A packed build ran on a local Convex backend, through openid-client and real Chrome, for first-party and third-party apps. A second browser without the cookie is refused.
  • Not tested: a real Google or GitHub sign-in with the new cookie. That needs the deploy.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…ds page

Every authorization request now sets the transaction cookie, so a first-party sign-in is bound to the
browser that started it (RFC 9700 section 2.1.1). Request Objects are refused, the issuer must be
secure, every 401 carries a challenge, and a parameter without a value counts as omitted. PKCE and
base64url come from oauth4webapi and jose. docs/standards.md lists each standard and its status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nicu-chiciuc
nicu-chiciuc merged commit bc8a2a9 into main Oct 30, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant