Right now we have two entry points for authentication, one for a launcher (using xsolla) and one in-game (playfab sdk). The xsolla launcher pushes a JWT with the playfab ID and playfab session ticket for authenticated users. The playfab SDK by default only sets those variables if you authenticate the user through the login methods provided by it.
Is there a way to set the client session ticket without calling the "Login" function?
Answer by Rick Chen · Dec 01, 2020 at 07:30 AM
You could try the following with UE4 plugin:
PlayFab::PlayFabSettings::SetClientSessionTicket("your session ticket");
The header needed to be included:
#include "Core/PlayFabSettings.h"
As you described, the xsolla launcher pushes a JWT with the playfab ID and playfab session ticket for authenticated users, how are the users authenticated if you are not using the playfab SDK?
I'm a little bit confused by what you mean in regards to the "how are the users authenticated if you are not using the playfab SDK". They are authenticated via the xsolla launcher, that's why the JWT is being passed with the authenticated playfabID and playfab session ticket. I'm sorry if I misunderstood the question.
Never mind, I was not familiar with xsolla and sorry for the confusion. Thank you for explaining.
thx for code but how can i use Client Session Ticket?
is this right away to use Session Login? before google gpgs login?
GetClientAPI = IPlayFabModuleInterface::Get().GetClientAPI();
PlayFab::ClientModels::FLoginWithGoogleAccountRequest SessionRequest;
SessionRequest.CreateAccount = false;
SessionRequest.ServerAuthCode = PlayFab::PlayFabSettings::GetClientSessionTicket();
//request.PlayerSecret = GetDefault<UPlayFabRuntimeSettings>()->DeveloperSecretKey;request.TitleId = GetDefault<UPlayFabRuntimeSettings>()->TitleId;
GetClientAPI->LoginWithGoogleAccount(SessionRequest,
PlayFab::UPlayFabClientAPI::FLoginWithGoogleAccountDelegate::CreateUObject(
this, &UPlayfabManager::OnSuccessPlayfabLogin),
PlayFab::FPlayFabErrorDelegate::CreateUObject(
this, &UPlayfabManager::OnSessionLoginErrorPlayfabReq)
sorry for reviving this thread, but could you tell me how we can do the same thing inside the C# SDK? I get a Login Result from a custom request and I want to set everything up but I can't find a "SetClientSessionTicket" or similar function anywhere
EDIT: nevermind, I ended up creating the Authentication Context from the Login Response, and I include that in the other requests
Answer by Jung Ho June · Mar 16 at 02:23 AM
now i using 4.27 version. but the client session ticket function cause linker external unresolve symbol error ofcourse i added build cs module
Facebook API error 1 Answer
Firebase, Google Login, and Unity 3 Answers
How to setup login with PlayFab for Unity 1 Answer
Server API for AddGenericId and GetPlayFabIDsFromGenericIDs 1 Answer