Skip to content

[codex] Make GitHub auth work through the site proxy#71

Merged
mberman84 merged 1 commit into
mainfrom
codex/github-auth-proxy-repair
Jun 23, 2026
Merged

[codex] Make GitHub auth work through the site proxy#71
mberman84 merged 1 commit into
mainfrom
codex/github-auth-proxy-repair

Conversation

@mberman84

Copy link
Copy Markdown
Collaborator

What changed

  • replace proxy-incompatible auth cookies with HMAC-signed session tokens stored in tab-scoped sessionStorage
  • bind OAuth state to a browser-generated nonce and safe return path
  • return a no-store callback bridge so browser navigation—not the here.now proxy—finishes OAuth
  • send session tokens only in same-origin JSON bodies for session lookup and vote writes
  • tolerate proxy-stripped Origin headers while still rejecting explicit untrusted origins
  • keep the voting launch flag off throughout the repair

Root cause

Production tracing during the staged deployment showed that the here.now proxy follows upstream redirects and strips Cookie, Origin, and Referer headers. The original cookie/302 OAuth design therefore could not complete through the canonical domain.

Validation

  • 46 Worker tests pass
  • node scripts/check.mjs
  • syntax and JSON validation
  • Worker deploy dry-run
  • production proxy tracing with voting hidden
  • autoreview clean after fixing session-restore and browser-back resilience findings

Deployment

Deploy the Worker first with VOTING_UI_ENABLED=false, republish the complete site artifact for the new cache key, complete the canonical GitHub login/session/vote/reload/logout smoke test, then redeploy only the Worker with the flag explicitly enabled.

@mberman84 mberman84 merged commit 3af9cbb into main Jun 23, 2026
1 check passed
@mberman84 mberman84 deleted the codex/github-auth-proxy-repair branch June 23, 2026 17:41
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.

1 participant