Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by alexmerza · Nov 30, 2020 at 09:43 PM · Authentication

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?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

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?

Comment

People who like this

0 Show 4 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image alexmerza · Dec 01, 2020 at 07:03 PM 0
Share

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.

avatar image Rick Chen ♦ alexmerza · Dec 02, 2020 at 02:34 AM 0
Share

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

avatar image Jung Ho June · May 07, 2021 at 03:54 AM -1
Share

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)
avatar image franciscoraposo · Apr 29 at 07:09 AM 0
Share

@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

avatar image

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

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    6 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    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

    Multiple accounts within the same title 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges