sandbox-agent/foundry/packages/backend
Nathan Flurry 8ddec6831b fix(foundry): deduplicate OAuth callbacks and cache actor handles to fix production auth
The production proxy chain (Cloudflare -> Fastly -> Railway) retries
OAuth callback requests when they take >10s. The first request succeeds
and deletes the verification record, so the retry fails with
"verification not found" -> ?error=please_restart_the_process.

- Add callback deduplication by OAuth state param in the auth handler.
  Duplicate requests wait for the original and return a cloned response.
- Cache appOrganization() and getUser() actor handles to eliminate
  redundant getOrCreate RPCs during callbacks (was 10+ per sign-in).
- Add diagnostic logging for auth callback timing and adapter operations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 22:29:17 -07:00
..
src fix(foundry): deduplicate OAuth callbacks and cache actor handles to fix production auth 2026-03-16 22:29:17 -07:00
test chore(foundry): migrate to actions (#262) 2026-03-16 15:23:59 -07:00
CLAUDE.md fix(foundry): move Better Auth operations from queues to actions to fix production auth timeout 2026-03-16 21:26:13 -07:00
package.json SDK: Add ensureServer() for automatic server recovery (#260) 2026-03-15 20:29:28 -07:00
tsconfig.json Rename Foundry handoffs to tasks (#239) 2026-03-11 13:23:54 -07:00
vitest.config.ts Rename Foundry handoffs to tasks (#239) 2026-03-11 13:23:54 -07:00