PFAuthenticationLoginWithWebPlayGamesServicesRequest データ モデル。 Google Play Games サインインは、デバイス上の Android API 用 Google Play Games サインインを使用して Google OAuth 2.0 資格情報を取得し、この API に渡すことによって実現されます。 ユーザーが Google Play Games アカウントを使用して初めてサインインし、CreateAccount が true に設定されている場合、新しい PlayFab アカウントが作成され、Google Play Games アカウントにリンクされます。 それ以外の場合で、PlayFab アカウントが Google Play Games アカウントにリンクされていない場合は、これを示すエラーが返され、タイトルがユーザーに対して PlayFab アカウントの作成をガイドできるようになります。 Android アプリケーションで Google Play Games アカウント資格情報を取得するための現在の (推奨) 方法は、GamesSignInClient.requestServerSideAccess() を呼び出し、認証コードをこの API の ServerAuthCode パラメーターとして送信することです。 これを行う前に、Google API コンソールで OAuth 2.0 Web アプリケーション クライアント ID を作成し、タイトルの PlayFab Game Manager Google アドオンでそのクライアント ID とシークレットを構成する必要があります。 この方法では、追加の Google アカウントの権限をユーザーに求める必要がないため、利用するユーザーの手間を最小限に抑えることができます。 サーバー認証コードの取得の詳細については、https://developers.google.com/games/services/android/signin を参照してください。
構文
typedef struct PFAuthenticationLoginWithGooglePlayGamesServicesRequest {
bool createAccount;
PFStringDictionaryEntry const* customTags;
uint32_t customTagsCount;
PFGetPlayerCombinedInfoRequestParams const* infoRequestParameters;
const char* playerSecret;
const char* serverAuthCode;
} PFAuthenticationLoginWithGooglePlayGamesServicesRequest;
メンバー
createAccount bool
現在この ID にリンクされている PlayFab アカウントがない場合は、PlayFab アカウントを自動的に作成します。
customTags PFStringDictionaryEntry const*
nullptr でもかまいません
(省略可能) 要求に関連付けられているオプションのカスタム タグ (ビルド番号、外部トレース識別子など)。
customTagsCount uint32_t
customTags の数
infoRequestParameters PFGetPlayerCombinedInfoRequestParams const*
nullptr でもかまいません
(省略可能) ユーザーに返される情報の一部を示すフラグ。
playerSecret const char*
が null で終わる
(省略可能) API 要求の署名を確認するために使用されるプレイヤー シークレット (エンタープライズのみ)。
serverAuthCode const char*
が null で終わる
クライアントで requestServerSideAccess() (https://developers.google.com/games/services/android/signin) Google Play Games クライアント API を呼び出して取得した OAuth 2.0 サーバー認証コード。
要件
ヘッダー: PFAuthenticationTypes.h