Skip to content

Commit 2574274

Browse files
committed
instance onAuth(): fix forwarding auth.token to server.
1 parent e3b417e commit 2574274

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

haxelib.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"license": "MIT",
55
"tags": ["multiplayer", "networking", "websockets", "netcode"],
66
"description": "Colyseus Multiplayer SDK",
7-
"version": "0.16.5",
7+
"version": "0.16.6",
88
"classPath": "src/",
9-
"releasenote": "@colyseus/schema: improve instance sharing and ref count tracking.",
9+
"releasenote": "onAuth() fix forwarding built-in auth token to server",
1010
"contributors": ["endel"],
1111
"dependencies": {
1212
"colyseus-websocket": "1.0.14",

src/io/colyseus/Client.hx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,13 @@ class Client {
176176
}
177177

178178
private function createConnection(room: Dynamic, options: Map<String, Dynamic>) {
179-
// append colyseusid to connection string.
179+
// build query string
180180
var params: Array<String> = [];
181181

182+
if (this.http.authToken != null) {
183+
options.set("_authToken", this.http.authToken);
184+
}
185+
182186
for (name in options.keys()) {
183187
params.push(name + "=" + options[name]);
184188
}

0 commit comments

Comments
 (0)