Skip to content

feat(oauth): give the browser redirect a real landing page - #3435

Open
taciturnaxolotl wants to merge 2 commits into
mainfrom
oauth-callback-page
Open

feat(oauth): give the browser redirect a real landing page#3435
taciturnaxolotl wants to merge 2 commits into
mainfrom
oauth-callback-page

Conversation

@taciturnaxolotl

Copy link
Copy Markdown
Member

Finishing an OAuth authorization dropped the user on a bare line of text in an otherwise empty tab, with no indication of what had been authorized and nothing to do but close the tab by hand.

image image

@taciturnaxolotl
taciturnaxolotl force-pushed the oauth-callback-page branch 5 times, most recently from 1171963 to 60dbe01 Compare July 27, 2026 15:36
Finishing an OAuth authorization dropped the user on a bare line of text
in an otherwise empty tab, with no indication of what had been authorized
and nothing to do but close the tab by hand.

The redirect now lands on a proper page: it names what was connected,
matches the look of the generated usage report, and on success counts
itself down and closes. A failure keeps the tab open and shows the
provider's own error code and explanation instead of taking the reason
away from whoever needs to read it. Rendering lives on its own so any
future browser-based login can reuse it, and everything it needs is
embedded in the binary.

Also fixes two ways the flow could go wrong. Connecting to a server can
put several requests in flight at once, and each one that was refused
asked to log in, so a single login could open two browser tabs and then
leave one of those requests waiting on a redirect the other had already
taken. Requests now share one login attempt. Separately, the listener
answered every path and treated anything it received as the redirect, so
an incidental browser request such as a favicon lookup could be mistaken
for the callback and abandon the login with an empty code.
The app event fan-in used lossy Publish for permission and question
events, so a saturated subscriber buffer could silently drop a
PermissionRequest and hang the tool call waiting on it. Fan them in
with must-deliver semantics, matching run-completions.
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