-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
Webchat UI fails to authenticate: 'gateway token missing' even with token in URL #1690
Copy link
Copy link
Closed
Closed
Copy link
Description
Bug Description
The webchat/dashboard UI fails to connect to the gateway websocket with the error:
disconnected (1008): unauthorized: gateway token missing (set gateway.remote.token to match gateway.auth.token)
Environment
- macOS 26.2 (arm64)
- Node 25.2.1
- Clawdbot version: 2026.1.22
- Gateway bound to loopback (127.0.0.1:18789)
- Auth mode: token
Configuration
{
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "<redacted>"
},
"port": 18789,
"bind": "loopback",
"remote": {
"token": "<redacted>" // Added this to match auth.token, still fails
}
}
}Steps to Reproduce
- Configure gateway with
auth.mode: "token"and set a token - Run
clawdbot gateway start - Run
clawdbot dashboard(or openhttp://127.0.0.1:18789/chat?token=<token>) - Dashboard UI loads but websocket connection fails with unauthorized error
What I Tried
- Adding token to URL query string:
?token=xxx— doesn't work - Running
clawdbot dashboardwhich should provide tokenized URL — doesn't work - Adding
gateway.remote.tokento config to matchgateway.auth.token— doesn't work - Setting
gateway.auth.mode: "off"— works but breaks other connections (Claude Code)
Expected Behavior
The webchat UI should:
- Read the token from the URL
?token=...parameter, OR - Read it from
gateway.remote.tokenin config, OR - Prompt the user to enter the token in the UI
Actual Behavior
The HTML/JS loads fine but the websocket connection is rejected with 1008 unauthorized.
Workaround
Use terminal CLI (clawdbot chat or clawdbot tui) instead of browser webchat.
Additional Context
- Gateway health check returns 200 OK
clawdbot statusshows gateway running and reachable- Other connections (WhatsApp, Claude Code) work fine with auth enabled
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.