Skip to content

Diagnose OAuth return failures without exposing credentials - #3

Merged
GothwadTech merged 1 commit into
mainfrom
arena/9fd3a12e-gitplus
Oct 24, 2026
Merged

GothwadTech merged 1 commit into
mainfrom
arena/9fd3a12e-gitplus

Conversation

@GothwadTech

Copy link
Copy Markdown
Collaborator

Report and confirmed finding

User can consent on GitHub, but GitPlus fails to connect on return. The exact live cause is still unconfirmed: no production logs/credentials were accessed. Review confirmed that the code discarded provider failure categories and rendered errors below the PAT form.

Changes

  • Allowlist OAuth token-exchange error categories, including JSON errors on non-2xx responses. Never relay provider descriptions, response bodies, unknown error strings or exception details.
  • Show safe stage/code/HTTP-status diagnostics in a focused, visible alert above OAuth/PAT choices; distinguish malformed responses, network errors and runtime failures.
  • Clarify that Pages Settings → Variables and secrets is the correct binding entry point, not the separate Runtime compatibility/placement panel.
  • No secrets embedded at build time, no logging of private data, no relaxed state/PKCE/origin/owner checks.

Validation

  • npm run check: 56 unit tests, TypeScript, Vite build, Functions compilation passed.
  • 11 Playwright browser tests passed (mocked providers, real built assets), including provider/HTML/origin-guard diagnostics, focus/viewport and redaction.
  • npm audit: 0 vulnerabilities. Diff whitespace check clean.

Limitation

This fixes error reporting/visibility, not a proven root cause of the user's live authentication failure. A fresh attempt on the diagnostic deployment is needed to identify the actual failing stage/reason. Existing approval to implement and merge the integration carries forward; do not label live OAuth as verified.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying gitplus with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9dcb94d
Status: ✅  Deploy successful!
Preview URL: https://2c085426.gitplus.pages.dev
Branch Preview URL: https://arena-9fd3a12e-gitplus.gitplus.pages.dev

View logs

@GothwadTech
GothwadTech merged commit b150646 into main Oct 24, 2026
5 checks passed
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