question

alexmerza avatar image
alexmerza asked

How do you set client session ticket using the UE4 plugin?

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?

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.

Rick Chen avatar image
Rick Chen answered

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?

4 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.

alexmerza avatar image alexmerza commented ·

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.

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ alexmerza commented ·

Never mind, I was not familiar with xsolla and sorry for the confusion. Thank you for explaining.

0 Likes 0 ·
franciscoraposo avatar image franciscoraposo commented ·

@Rick Chen

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

0 Likes 0 ·
Jung Ho June avatar image Jung Ho June commented ·

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)
-1 Like -1 ·
Jung Ho June avatar image
Jung Ho June answered

now i using 4.27 version. but the client session ticket function cause linker external unresolve symbol error ofcourse i added build cs module

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.