Working on an application in Unity that logs-in using playfab SDK and communicates with our own custom server using the provided authentication token and our server authenticates those requests with playfab using the provided token.
This works great when running in the Unity editor. However, when I create a build and run on the PS4 the flow fails.
Works in Editor - Client uses PlayFabClientAPI.LoginWithCustomID (constructing a name from the computer and username) and passes the "SessionTicket" to the server which uses PlayFabServerAPI.AuthenticateSessionTicketAsync.
Fails on PS4 - Client uses PlayFabClientAPI.LoginWithPSN and passes the returned loginResponse.EntityToken?.EntityToken to the server which uses PlayFabServerAPI.AuthenticateSessionTicketAsync. The PS4 token we get back seems correct. I have confirmed that the token the server receives is the same that the client sends (sanity check).
Do I need to use a different method on the server to authenticate the "EntityToken"? Or is it rather that I need to pass a different value to the server so it can authenticate via PlayFabServerAPI.AuthenticateSessionTicketAsync?