From fd72a0ab3790e4dd457709401168b6079c10f9cc Mon Sep 17 00:00:00 2001 From: sapaczb Date: Mon, 18 Nov 2024 17:48:43 -0500 Subject: [PATCH 1/3] FLoginWithGoogleAccountRequest - AccessToken fixup - added missing AccessToken to request --- .../Private/Core/PlayFabClientDataModels.cpp | 13 +++++++++++++ .../Public/Core/PlayFabClientDataModels.h | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Private/Core/PlayFabClientDataModels.cpp b/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Private/Core/PlayFabClientDataModels.cpp index 15b24380..30364700 100644 --- a/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Private/Core/PlayFabClientDataModels.cpp +++ b/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Private/Core/PlayFabClientDataModels.cpp @@ -17068,6 +17068,12 @@ void PlayFab::ClientModels::FLoginWithGoogleAccountRequest::writeJSON(JsonWriter { writer->WriteObjectStart(); + if(!AccessToken.IsEmpty()) + { + writer->WriteIdentifierPrefix(TEXT("AccessToken")); + writer->WriteValue(AccessToken); + } + if (CreateAccount.notNull()) { writer->WriteIdentifierPrefix(TEXT("CreateAccount")); @@ -17132,6 +17138,13 @@ bool PlayFab::ClientModels::FLoginWithGoogleAccountRequest::readFromValue(const { bool HasSucceeded = true; + const TSharedPtr AccessTokenValue = obj->TryGetField(TEXT("AccessToken")); + if (AccessTokenValue.IsValid() && !AccessTokenValue->IsNull()) + { + FString TmpValue; + if (AccessTokenValue->TryGetString(TmpValue)) { AccessToken = TmpValue; } + } + const TSharedPtr CreateAccountValue = obj->TryGetField(TEXT("CreateAccount")); if (CreateAccountValue.IsValid() && !CreateAccountValue->IsNull()) { diff --git a/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h b/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h index ec9cb45f..c3039453 100644 --- a/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h +++ b/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h @@ -8875,6 +8875,9 @@ namespace ClientModels struct PLAYFABCPP_API FLoginWithGoogleAccountRequest : public PlayFab::FPlayFabCppRequestCommon { + // Access token issued by Google OAuth + FString AccessToken; + // [optional] Automatically create a PlayFab account if one is not currently linked to this ID. Boxed CreateAccount; @@ -8913,7 +8916,8 @@ namespace ClientModels PlayerSecret(), ServerAuthCode(), SetEmail(), - TitleId() + TitleId(), + AccessToken() {} FLoginWithGoogleAccountRequest(const FLoginWithGoogleAccountRequest& src) = default; From 473a4f6924e5f1926759faf9659ad5acf610509d Mon Sep 17 00:00:00 2001 From: sapaczb Date: Mon, 18 Nov 2024 17:50:53 -0500 Subject: [PATCH 2/3] Update PlayFabClientDataModels.h --- .../Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h b/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h index c3039453..d3b4cf6a 100644 --- a/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h +++ b/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h @@ -8875,7 +8875,7 @@ namespace ClientModels struct PLAYFABCPP_API FLoginWithGoogleAccountRequest : public PlayFab::FPlayFabCppRequestCommon { - // Access token issued by Google OAuth + // access_token from a successful Google OAuth FString AccessToken; // [optional] Automatically create a PlayFab account if one is not currently linked to this ID. From 26ac28eda1b093291c02bf4d543aa8a46ef028cf Mon Sep 17 00:00:00 2001 From: sapaczb Date: Wed, 20 Nov 2024 23:42:51 -0500 Subject: [PATCH 3/3] Update PlayFabClientDataModels.h - changed order of AccessToken to fix compiler warning --- .../Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h b/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h index d3b4cf6a..69df87bf 100644 --- a/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h +++ b/5.4/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Public/Core/PlayFabClientDataModels.h @@ -8875,9 +8875,6 @@ namespace ClientModels struct PLAYFABCPP_API FLoginWithGoogleAccountRequest : public PlayFab::FPlayFabCppRequestCommon { - // access_token from a successful Google OAuth - FString AccessToken; - // [optional] Automatically create a PlayFab account if one is not currently linked to this ID. Boxed CreateAccount; @@ -8907,6 +8904,9 @@ namespace ClientModels */ FString TitleId; + // access_token issued by Google OAuth + FString AccessToken; + FLoginWithGoogleAccountRequest() : FPlayFabCppRequestCommon(), CreateAccount(),