colyseus / colyseus-social

Authentication and Social features
https://docs.colyseus.io/tools/colyseus-social/
MIT License
21 stars 17 forks source link

Custom UserID Support #9

Open game-libgdx-unity opened 5 years ago

game-libgdx-unity commented 5 years ago

Hi,

I have an authentication system that provide userIDs.

By anonymous login, Instead of generating ID from the server, I would like to use my ID to login into colyseus-social. From what i see in the source-code, I can send "deviceId" or "platform" to the server, is it possible to post an existing ID to the server as well?

`

queryParams["deviceId"] = GetDeviceId();
queryParams["platform"] = GetPlatform();
        var userData = await Request<UserData>("POST", "/auth", queryParams);

        _id = userData._id;
        Username = userData.Username;
        DisplayName = userData.DisplayName;
        AvatarUrl = userData.AvatarUrl;

        FriendIds = userData.FriendIds;
        BlockedUserIds = userData.BlockedUserIds;

        Token = userData.Token;`

Thanks!