question

Samuel Kahn avatar image
Samuel Kahn asked

Client login to playfab with user id and session token but without password

Hello,

My game has a launcher and a login UI in the game. The user should first log into the launcher, which updates and starts the game.

I would like to avoid prompting the user to log in a second time. The idea is that since the user is logged in to playfab with the launcher, I can pass the user id and session token to the game client. However, I can't find an API call to log in again with the session token and the user id but without the password, so I can start calling client API.

Is there a way to do this?

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

·
Seth Du avatar image
Seth Du answered

There is no such API because to make client API call (besides login related ones), you only need session ticket.

Hence, you may save session ticket in the launcher and send it to the clients afterwards. If you are using Unity SDK, you can pass the session ticket to:

PlayFabSettings.staticPlayer.ClientSessionTicket

After that you will be able to use Client API calls.

2 comments
10 |1200

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

Samuel Kahn avatar image Samuel Kahn commented ·

Indeed, I found the answer after having posted this question. Thank you!

0 Likes 0 ·
Paulo avatar image Paulo commented ·

Hi there, how can a Session Ticket be set on PlayFabSettings.staticPlayer.ClientSessionTicket? And then how to get user data like PlayFabId, Entity ID?

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.