question

Playfabe avatar image
Playfabe asked

Simulating user authentication from a Docker Container (Unity; Mirror)

Hey guys! I followed along with a YouTube tutorial that walked me through this process of uploading my server to a Docker container for testing.

After completing the guide, I'm unclear on one thing. Is there any way for me to actually test the flow of authenticating PlayFab users and retrieving their data? I end up with an OnReceiveAuthenticate method that takes a ReceieveAuthenticateMessage when following the guide (from UnityNetworkServer.cs), but I can't find an explanation anywhere of what is supposed to interact with this callback, or where/when this message should be sent to the server.

Right now I have a working server in my Docker Container, but it simply accepts anonymous users with no connection to any PlayFab data, so it's not a great testing environment. Is there something I'm missing? Let me know if there's anything with regard to my environment/goal that I can clarify. Thanks!

unity3dmultiplayertest
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

According to the script templates of Mirror Authenticator, OnReceiveAuthenticate is called on server when the client's AuthRequestMessage arrives. The client also needs to implement the similar code to send the authenticate message when it connects to the server. Please refer to Network Authenticators - Mirror (gitbook.io) to learn more info.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.