Repository navigation
feat(app-ui): open an app page once from a one-time launch link - #1
Merged
zackleman merged 5 commits intoNov 27, 2026
Merged
Conversation
Add `appUi.launch` (POST /api/organizations/:organization/apps/:app/ui/launch). It answers as `appUi.location` does, and when the page is ready its URL is a one-time link on the app's origin, `/_executor/auth/launch?code=...`. Opening it in a browser with no Executor session, such as an embedded web view, signs that browser in to the one app and redirects to its root. The link makes the same checks as opening the app (membership, the app's `use` access, a token's `data` action and app scope), works once, expires after 60 seconds, and is kept only as the digest of its code in Better Auth's verification store. Its session is the usual app-origin session (HttpOnly, SameSite=Lax, `__Host-` and Secure on HTTPS, at most a week) and ends with the credential that asked for it: a dashboard session as before, or an API key or OAuth grant, checked on every use like a session's parent login. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70db459d0b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…t by previews An OAuth grant's authority can narrow and its tokens lapse with no row an app request could recheck, so a launch from one is refused rather than leaving a page session that outlives or outgrows its grant. A HEAD or prefetch leaves the code unspent, and a browser already signed in to the app keeps its session. Release-note: Feature: Self-host can open a private app page in a browser with no Executor session through a one-time launch link from the appUi.launch operation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p logins A browser's subresource or frame request leaves a launch link unspent, and a browser counts as signed in to the app only while its session may still open it. The launch scenario now asks for the link through an OAuth-connected MCP client, as an agent does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An agent can launch through the Executor app's own key, which outlives the agent's grant, so a launched page's session lasts an hour, not a signed-in week. Dashboard sign-ins are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
appUi.launch: a one-time link that opens a private app page signed in, for a browser that has no Executor session, such as an embedded web view or a fresh browser profile. Today such a browser can only reach an app page through dashboard sign-in, which some sign-in providers refuse inside embedded web views.What it does
POST /api/organizations/:organization/apps/:app/ui/launchreturns the same answer asappUi.location. In code mode it'stools.executor.appUi.launch({ path: { organization, app } }). When the page is ready,urlishttps://<app origin>/_executor/auth/launch?code=<64 hex>.__Host-executor_app, HttpOnly, Secure, SameSite=Lax, Path=/) and redirects to/.Sec-PurposeorPurpose), or a browser subresource or frame request (Sec-Fetch-Destother thandocument) gets 405 and leaves the code unspent./without being spent. So a link someone else sends can't swap whose page the browser shows.useaccess, and a token'sdataaction and app scope. It works once and expires after 60 seconds. Only the SHA-256 digest of the code is stored, in the Better Auth verification table the app sign-in records already use. Telemetry records paths only, so the code never reaches a span.Who may launch, and for how long
The link is a bearer credential for its 60 seconds: whoever opens it first is signed in as the caller. The tool description says to treat it as a password.
Tests
Both new scenarios in
e2e/tests/app-ui-launch.spec.tspass on self-host. The first gets the link through MCP code mode from an OAuth-connected client.The existing app-page scenarios also pass:
app-ui.spec.ts(9),app-ui-failures.spec.ts(2),app-ui-frame-ancestors.spec.ts, and the private app access scenario inresource-access.spec.ts.Each new guard was disabled in turn, and its assertion failed:
bun run checkpasses, 17 of 17. The image tag moves to2.0.0-beta.66-frame.3.Reviewed with sol-loop: 4 rounds with gpt-6.2-sol. Sol verdict: approved
🤖 Generated with Claude Code