fix: use 'connect' method with auth.token for gateway handshake
Gateway uses JSON-RPC method 'connect' (not 'hello') with auth object containing token field. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -220,13 +220,14 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
client.onopen = () => {
|
client.onopen = () => {
|
||||||
|
// Gateway uses "connect" method with auth in params
|
||||||
client.send(JSON.stringify({
|
client.send(JSON.stringify({
|
||||||
jsonrpc: '2.0',
|
jsonrpc: '2.0',
|
||||||
method: 'hello',
|
method: 'connect',
|
||||||
params: {
|
params: {
|
||||||
clientName: 'harbor-forge-calendar',
|
clientName: 'harbor-forge-calendar',
|
||||||
mode: 'backend',
|
mode: 'backend',
|
||||||
...(gwToken ? { token: gwToken } : {}),
|
...(gwToken ? { auth: { token: gwToken } } : {}),
|
||||||
},
|
},
|
||||||
id: 1,
|
id: 1,
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user