question

Michael McGrath avatar image
Michael McGrath asked

Storing a LoginResult and AuthenticationContext

using UE 4.20

After logging in, what am I supposed to do with the login result?

I recently updated the sdk and noticed there are many changes where Requests and Results have an authenticationcontext. This causes a crash because I was keep a local copy of my login result to reference for other calls.

Now that it has an authenticationcontext TSharedPtr and it is the only one holding a reference to it. When i try to assign it, or it goes out of scope the ref count gets decremented and DestroyObject is called. Its being destroyed twice?

What is the proper way to store this data for future calls? What data is safe to store?

apissdksAuthentication
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

·
Hernando avatar image
Hernando answered

Are you manually saving the authentication information used to call other PlayFab APIs after login? Actually, you don't need to keep the full response or the Authentication context around, the UE4 Sdk will automatically save it and add it the request header afterwards.

Besides, if you want to keep the player's entity key along with any other data, you might have requested through InfoRequestParameters.

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.