Files
openclaw/assets/chrome-extension
oneaix 216d99e585 fix(browser): derive relay auth token from gateway token in Chrome extension
The extension relay server authenticates using an HMAC-SHA256 derived
token (`openclaw-extension-relay-v1:<port>`), but the Chrome extension
was sending the raw gateway token. This caused both the WebSocket
connection and the options page validation to fail with 401 Unauthorized.

Additionally, the options page validation request triggered a CORS
preflight (due to the custom `x-openclaw-relay-token` header) which the
relay rejects because OPTIONS requests lack auth headers. The options
page now delegates the check to the background service worker which has
host_permissions and bypasses CORS preflight.

Fixes #23842

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit bbc654b9f063ef24e7d511275e7d8c670414970b)
2026-02-23 18:56:14 +00:00
..
2026-01-15 05:11:03 +00:00

OpenClaw Chrome Extension (Browser Relay)

Purpose: attach OpenClaw to an existing Chrome tab so the Gateway can automate it (via the local CDP relay server).

Dev / load unpacked

  1. Build/run OpenClaw Gateway with browser control enabled.

  2. Ensure the relay server is reachable at http://127.0.0.1:18792/ (default).

  3. Install the extension to a stable path:

    openclaw browser extension install
    openclaw browser extension path
    
  4. Chrome → chrome://extensions → enable “Developer mode”.

  5. “Load unpacked” → select the path printed above.

  6. Pin the extension. Click the icon on a tab to attach/detach.

Options

  • Relay port: defaults to 18792.
  • Gateway token: required. Set this to gateway.auth.token (or OPENCLAW_GATEWAY_TOKEN).