Skip to content

H1b: code-in-body cross-app exchange endpoint (re-land of #23) - #28

Merged
tuvens merged 2 commits into
developfrom
feat/tuvens-cross-app-exchange
Jul 21, 2026
Merged

H1b: code-in-body cross-app exchange endpoint (re-land of #23)#28
tuvens merged 2 commits into
developfrom
feat/tuvens-cross-app-exchange

Conversation

@tuvens

@tuvens tuvens commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Re-land of #23, which was accidentally squash-merged into its stacked base branch (feat/tuvens-account-mapping) instead of develop after a base-retarget silently failed — that merge never reached develop. This PR carries the identical rebased commits (exchange endpoint + the review-ask follow-up: organiser gate, throttle, json('code')), now correctly targeting develop.

Coordinator approval of record: see #23 (both asks verified folded in on re-review). No code changes since that approval beyond the mechanical rebase onto post-#22 develop.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RrKvdjja8NtzqRKJnX7sA1

tuvens and others added 2 commits July 21, 2026 16:30
Second hardened slice of the Tuvens integration (#16, #17):

- CrossAppAuthAction reduced to a single exchange: POST /auth/cross-app/validate
  with {"code"} in the JSON body. The code is read strictly from the body
  (query-string values are ignored), validated server-to-server via
  SecureCrossAppAuthService, and exchanged for a hi.events JWT carrying an
  account_id claim, using the same response shape as regular login.
- Removed: mock_session_* bypass, status/accounts/validate-permission
  endpoints (superseded by the one-time-code seam), token logging, and all
  query-param token reads.
- config/app.php frontend_url is env-only (no localhost fallback).
- CrossAppAuthenticationTest rewritten for the new contract (10 tests):
  exchange success incl. account+organizer provisioning, HMAC-signed
  upstream request, body-only code reads, mock tokens rejected, shared
  accounts never claimed, no validation caching.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrKvdjja8NtzqRKJnX7sA1
…view follow-up)

Coordinator review asks on PR #23:

- Defense in depth: refuse any validate response without organiser === true;
  tuvens-api's mint endpoint is the primary gate, but hi.events won't mint a
  session without the flag. New test asserts refusal without provisioning.
- throttle:10,1 on the public exchange endpoint, with a 429 test.
- Tightened code read to json('code') only (dropped the form-post fallback).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrKvdjja8NtzqRKJnX7sA1
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@tuvens
tuvens merged commit b41c102 into develop Jul 21, 2026
1 of 9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant