diff --git a/.changeset/yellow-goats-whisper.md b/.changeset/yellow-goats-whisper.md new file mode 100644 index 0000000..0c5e085 --- /dev/null +++ b/.changeset/yellow-goats-whisper.md @@ -0,0 +1,5 @@ +--- +'@clockworklabs/spacetimedb-sdk': patch +--- + +fix: temporary token path invocation diff --git a/packages/sdk/src/websocket_decompress_adapter.ts b/packages/sdk/src/websocket_decompress_adapter.ts index 6d2a4cc..26cad18 100644 --- a/packages/sdk/src/websocket_decompress_adapter.ts +++ b/packages/sdk/src/websocket_decompress_adapter.ts @@ -84,7 +84,7 @@ export class WebsocketDecompressAdapter { WS = WebSocket; } - const tokenUrl = new URL('identity/websocket_token', url); + const tokenUrl = new URL('/identity/websocket_token', url); tokenUrl.protocol = url.protocol === 'wss:' ? 'https:' : 'http:'; const response = await fetch(tokenUrl, { method: 'POST', headers });