question

monterey avatar image
monterey asked

Remote Server AuthenticateSessionTicket w/ Playstation client

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?

Authentication
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

·
Andy avatar image
Andy answered

Your second hunch is correct. AuthenticateSessionTicket can only validate SessionTickets. Those are different than the EntityToken you're providing in your PS4 case.

To get it working, the LoginWithPSN call should also return a SessionTicket. With that, you'll be able to provide a value to your server that the AuthenticateSessionTicket method understands.

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.