File tree Expand file tree Collapse file tree
docs/docs/00100-intro/00300-tutorials/00300-unity-tutorial Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -755,6 +755,10 @@ public class GameManager : MonoBehaviour
755755#if UNITY_WEBGL && ! UNITY_EDITOR
756756 if (AuthToken .Token == " " )
757757 {
758+ // No token was supplied to the connection, so this is the
759+ // long-lived server-issued token for the new identity. Save it.
760+ // If a token already exists, this connect may have used a
761+ // short-lived WebSocket token, which should not overwrite it.
758762 AuthToken .SaveToken (token );
759763 }
760764#else
Original file line number Diff line number Diff line change @@ -1367,6 +1367,10 @@ Next lets add some callbacks when rows change in the database. Modify the `Handl
13671367#if UNITY_WEBGL && ! UNITY_EDITOR
13681368 if (AuthToken .Token == " " )
13691369 {
1370+ // No token was supplied to the connection, so this is the
1371+ // long-lived server-issued token for the new identity. Save it.
1372+ // If a token already exists, this connect may have used a
1373+ // short-lived WebSocket token, which should not overwrite it.
13701374 AuthToken .SaveToken (token );
13711375 }
13721376#else
You can’t perform that action at this time.
0 commit comments