Skip to content

fix(auth): open device-auth link in a new tab from the auth dialog - #18

Open
gpasquero wants to merge 2 commits into
formulahendry:mainfrom
gpasquero:fix/auth-dialog-open-link
Open

gpasquero wants to merge 2 commits into
formulahendry:mainfrom
gpasquero:fix/auth-dialog-open-link

Conversation

@gpasquero

Copy link
Copy Markdown

Problem

When an agent requires device-authorization, the auth dialog shows instructions like "Open https://…/device?user_code=XXXX in your browser and approve (code XXXX), then choose this method to finish signing in." But the URL was rendered as plain text: clicking the method just closed the dialog without opening the link, forcing users to select and copy/paste the URL by hand.

Changes

  • Open the embedded auth URL on select. Clicking anywhere on a method item now opens the first URL from its description in a new tab and closes the dialog (fires authenticate), matching the "open then finish" device flow.
  • Clickable URLs in the description. URLs are rendered as anchors (target="_blank", rel="noopener noreferrer"); direct clicks are de-duplicated so only one tab opens.
  • Copy code button. Extracts the device user_code (from user_code=… in the URL, or an inline (code …)) and copies it to the clipboard with transient "Copied!" feedback. Hidden when no code is present. @click.stop so copying doesn't close the dialog.

No changes to protocol handling or other components; scoped to AuthMethodDialog.vue.

Testing

  • npx vue-tsc --noEmit passes.
  • Verified in the web build (npm run dev:web) against an agent using GlobAI device auth: single click opens the auth URL in a new tab and closes the dialog; Copy code copies the user code.

Clicking an authentication method now opens the embedded device-authorization
URL in a new tab while closing the dialog, instead of leaving users to copy
the link by hand. URLs in the method description are also rendered as clickable
links, and a Copy code button is added for the device user_code.

- Parse and open the first URL in the method description on select
- Render description URLs as anchors (target=_blank), click handled by the item
- Add a Copy code button that extracts user_code=... or the inline (code ...)
gpasquero pushed a commit to gpasquero/acp-ui that referenced this pull request Aug 26, 2026
Add an 'About this fork' section explaining that community PRs have sat
open upstream for months, that this fork ships those fixes and hosts its
own web build, and listing the auth-dialog device-auth link fix (formulahendry#18).
In a Tauri webview window.open()/<a target=_blank> don't reach the system
browser, so the device-auth link did nothing on desktop. Route it through a
host-aware openExternalUrl() helper (opener plugin on Tauri, window.open on web).
@gpasquero
gpasquero force-pushed the fix/auth-dialog-open-link branch from 8065aaf to 732b3d2 Compare August 26, 2026 17:58
gpasquero pushed a commit to gpasquero/acp-ui that referenced this pull request Aug 26, 2026
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