Skip to content

fix sailapps oauth broker pickup flow#189

Merged
luke-hagar-sp merged 21 commits into
mainfrom
fix/sailapps-oauth-broker
Jun 4, 2026
Merged

fix sailapps oauth broker pickup flow#189
luke-hagar-sp merged 21 commits into
mainfrom
fix/sailapps-oauth-broker

Conversation

@luke-hagar-sp

@luke-hagar-sp luke-hagar-sp commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep SailApps OAuth broker pickup secrets and RSA keys ephemeral in the Electron main process.
  • Poll token pickup with the required bearer pickup secret and handle pending, unauthorized, timeout, and cancel states explicitly.
  • Pass the broker-provided ttl to the renderer as an optional timeout hint while keeping the pickup secret out of IPC and logs.

Notes for reviewers

  • This is not just a ttl change. The core fix is the broker pickup contract: POST /auth returns a pickup secret, GET /auth/token/{id} must use it as a bearer token, and the encrypted token payload must be decrypted with the in-memory RSA private key.
  • ttl is optional in the app typings. When present, it prevents polling after the broker session expires; when absent, the UI keeps the existing 5-minute fallback.
  • The prior CI/e2e workaround commits have been cleaned up. The PR no longer skips the Electron launch smoke test in CI or adds Electron install helper scripts.

Test plan

  • Lint diagnostics are clean for the OAuth files touched by this PR.
  • GitHub Actions will rerun the original Linux, Windows, and macOS build/e2e checks after the cleanup commit.

Made with Cursor

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

🚀 Preview Deployment Ready

Your changes have been deployed and are available at:

Built from commit: cd3f350


This comment will be updated with each new deployment.

luke-hagar-sp and others added 21 commits June 4, 2026 10:45
Keep broker pickup secrets ephemeral in the main process and poll token pickup with the required bearer authorization.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rebuild Electron before Playwright e2e runs so CI has the platform binary available before launching the app.

Co-authored-by: Cursor <cursoragent@cursor.com>
Run Electron's installer directly before Playwright so CI writes the executable path required to launch e2e tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Clear the skip-download environment flag before running Electron's installer so CI writes the executable path for Playwright.

Co-authored-by: Cursor <cursoragent@cursor.com>
Spawn Electron's installer as a child process so CI waits for path.txt before Playwright requires Electron.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a verified Electron install helper so Linux and Windows CI have a resolved executable before Playwright launches e2e tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Download and extract Electron directly before e2e tests so CI can verify the platform executable exists.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve Electron's installer dependencies from the electron package so CI works with nested node_modules layouts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pass Playwright the verified Electron executable path so CI launches the binary installed by the helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
Read Electron's installed path from path.txt so Playwright can launch the verified binary without require-style imports.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the helper process alive until Electron has downloaded, extracted, and written path.txt before e2e starts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bound Electron window readiness waits so CI resolves current window state even if ready-to-show fired early.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bound tracing and app shutdown so CI cannot hang indefinitely after launching Electron.

Co-authored-by: Cursor <cursoragent@cursor.com>
Simplify the Electron launch check and force-terminate the test app so Linux and Windows CI cannot hang in e2e teardown.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use a bounded direct Electron process launch to avoid Playwright launcher hangs on Linux and Windows CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid forcing Electron binary downloads during CI e2e runs, while keeping the production build gate and running the launch smoke test when the executable is available.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the original Playwright e2e path and remove the CI skip helpers so this PR stays focused on the broker OAuth integration.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ensure Electron is installed during CI runs for both Ubuntu and Windows workflows. This addition prevents potential issues related to missing Electron executables during the build process.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the direct installation script with 'npm rebuild electron' in both Ubuntu and Windows CI workflows. This change ensures a more reliable installation process for Electron during continuous integration runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Enhance the Electron installation process in both Ubuntu and Windows CI workflows by replacing the 'npm rebuild electron' command with a more robust script that downloads and extracts the Electron binary. This change improves reliability and ensures the correct executable is available during continuous integration runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Eliminate the custom Electron installation scripts from both Ubuntu and Windows CI workflows. This change simplifies the workflows by relying on the default package management for Electron installation, improving maintainability and reducing complexity.

Co-authored-by: Cursor <cursoragent@cursor.com>
@luke-hagar-sp luke-hagar-sp force-pushed the fix/sailapps-oauth-broker branch from 6a2c92c to cd3f350 Compare June 4, 2026 15:45
@luke-hagar-sp luke-hagar-sp merged commit cb4c057 into main Jun 4, 2026
10 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.

2 participants