Repository navigation
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. Release-note: Feature: Executor can give a one-time link that opens an app's page signed in, for a browser with no Executor session such as an embedded web view. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
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 <[email protected]>
This branch has not been deployed
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/launch(code mode:tools.executor.appUi.launch({ path: { organization, app } })) answers with the same union asappUi.location. In the ready case,urlishttps://<app origin>/_executor/auth/launch?code=<64 hex>.__Host-executor_app, HttpOnly, Secure, SameSite=Lax, Path=/) and redirects to/. A spent, expired, unknown or other app's code gets the existing "Could not sign in to this app" page and no cookie.useaccess, a token'sdataaction and app scope), 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
Only a caller holding a browser session or an API key. An OAuth access token gets 403: a grant's authority can narrow and its tokens lapse with no row a later app request could recheck. An API key with a use budget (
remainingset) is never accepted as the page's parent. An MCP client connected through OAuth still gets a link through code mode, since the Executor app makes that call with its own API key.Session lifetime
A launched session lasts at most one hour, not the week a dashboard sign-in gets, because the key behind it can outlive the agent that asked. It also ends sooner when its parent credential (the caller's dashboard session or API key) is revoked, disabled or expired, checked on every request. Dashboard sign-in sessions are unchanged, and existing session records still decode: a dashboard parent stays a bare session ID.
Links are not spent by accident
HEAD, a prefetch (Sec-Purpose: prefetchorPurpose: prefetch, as link previews send) or a subresource or frame request (Sec-Fetch-Destpresent and notdocument) gets 405 and leaves the code unspent. A client that sends no fetch metadata is let through./without spending the code or replacing the cookie, so a link someone else sends cannot swap whose page the browser shows.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
app-ui-launch.spec.tscovers the link through an OAuth-connected MCP client, single use, other apps, 405 forHEAD, prefetch andSec-Fetch-Dest: imagewithout spending the link, an existing app session kept, a member without access and an OAuth token both refused, the 60 second expiry, a cookie expiry within (50, 60] minutes and a 401 after the clock moves 61 minutes, and the session ending when the API key is revoked.Tested locally on self-host:
app-ui-launch.spec.ts,app-ui.spec.ts,app-ui-failures.spec.tsand the private app access scenario inresource-access.spec.ts(15 passed). The main scenario is also scheduled on Cloud, which I could not run locally.bun run checkpasses.🤖 Generated with Claude Code