question

stevenbalderrama avatar image
stevenbalderrama asked

Playfab logout

Hello,

so I have followed the documentation and some youtube videos on having the player, register, log in, recover... but trying to find one that will "Logout" the player, or end there session etc., but there is no clear answer to this, so not sure if there is? the only thing i got was:

https://community.playfab.com/idea/35615/client-api-call-for-logout.html

to use: PlayFabClientAPI.ForgetAllCredentials()

is this still valid to log the player out? what i want like many online games is for the player to hit the button and "Log out" of the game when they are done playing...

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

PlayFab is a service based on RESTful API, which is stateless. The Session ticket/Entity token returned from successful login API will last around 24 hours and there is no built-in logout feature.

To be clear, PlayFabClientAPI.ForgetAllCredentials() is not an API call, instead it is just a Unity-specific feature that helps players to clear the login credentials. However, it is true that You can implement this method in button OnClick function to realize a logout feature.

If you have any trouble on a specific case, please feel free to let us know.

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.

laurentg avatar image laurentg commented ·

Redundant question : deleted it.
Apologies for the noise.

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.