Skip to content

Commit 646a54a

Browse files
committed
instance onAuth(): fix forwarding auth.token to server.
1 parent ada1615 commit 646a54a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Assets/Colyseus/Runtime/Colyseus/Models/ColyseusClient.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ protected ColyseusConnection CreateConnection(ColyseusRoomAvailable room, Dictio
383383
options = new Dictionary<string, object>();
384384
}
385385

386+
// Add authentication token to query string
387+
if (!string.IsNullOrEmpty(Http.AuthToken))
388+
{
389+
options.Add("_authToken", Http.AuthToken);
390+
}
391+
386392
List<string> list = new List<string>();
387393
foreach (KeyValuePair<string, object> item in options)
388394
{

Assets/Colyseus/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "io.colyseus.sdk",
3-
"version": "0.16.10",
3+
"version": "0.16.11",
44
"displayName": "Colyseus SDK",
55
"description": "Colyseus Multiplayer SDK for Unity",
66
"unity": "2019.1",

0 commit comments

Comments
 (0)