question

paulucci-marco07 avatar image
paulucci-marco07 asked

GameServer Auth Issue

Hello! I'm very close to successfully setting up my gameserver on playfab (already ran it locally without issues).

I have implemented the matchmaking and it seems to work. However, after matchmaking, I'm trying to authenticate the user and I believe there might be some trouble there.

I've followed the gameserver example (using the auth ticket). I believe the server does receive the auth because as I mentined previously, this all worked fine on a local unity server.

From my logs I get:
- Playfab client logged in successfully
- Connecting to server (NetworkClient connect)
- Disconnected from server

So I'm assuming the 30s authentication limit is taking place, but I cannot figure why, and I am unable to access/find logs either (I'm using the Logger.Dispatch, I don't know if that's supposed to work). Any help is greatly appreciated.

AuthenticationCustom Game Servers
1 comment
10 |1200

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

paulucci-marco07 avatar image paulucci-marco07 commented ·

My title ID: 37E

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

What specific call are you using to authenticate the user at the server? In general, you should be using AuthenticateSessionTicket with the ticket that was passed back by the matchmaker. I actually just did a local and hosted server test using the game server sample from GitHub, so I can confirm that the process works quite well in the sample (assuming you have the settings correct - check that the Title ID and Secret Key are set for the server build, for example).

1 comment
10 |1200

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

paulucci-marco07 avatar image paulucci-marco07 commented ·

Brendan,

after going through the process multiple times, I found the issue. After the client connected, I was using my logger class to output data into gameobjects that were disabled on my server build. And yes, the sample is pretty good. I went through the entire code multiple times while reading Unity Networking documentation and these forums, and started understanding what was happening. Finally things are set up and working.

0 Likes 0 ·

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.