> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFAuthenticationLoginWithGameCenterRequest

> 使用 Game Center 玩家識別碼以及簽章、salt 和時間戳記欄位登入的要求資料。絕不可向終端使用者公開此識別碼。

PFAuthenticationLoginWithGameCenterRequest 資料模型。Game Center 玩家識別碼 ([https://developer.apple.com/library/ios/documentation/Accounts/Reference/ACAccountClassRef/index.html#](https://developer.apple.com/library/ios/documentation/Accounts/Reference/ACAccountClassRef/index.html#) // apple\_ref/occ/instp/ACAccount/identifier) 是儲存在本機裝置上的產生字串。與裝置識別碼一樣，必須小心絕不向終端使用者公開玩家的 Game Center 識別碼，因為這可能導致使用者的帳戶遭到入侵。如果這是使用者第一次使用 Game Center 登入，且 CreateAccount 設定為 true，系統將會建立新的 PlayFab 帳戶，並將其連結至 Game Center 識別碼。在此情況下，不會有任何電子郵件或使用者名稱與該 PlayFab 帳戶相關聯。否則，如果沒有任何 PlayFab 帳戶連結至 Game Center 帳戶，將會傳回指出此情況的錯誤，讓遊戲可以引導使用者建立 PlayFab 帳戶。如果使用無效的 iOS Game Center 玩家識別碼，將會傳回指出此情況的錯誤。

## 語法

```cpp theme={null}
typedef struct PFAuthenticationLoginWithGameCenterRequest {  
    bool createAccount;  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFGetPlayerCombinedInfoRequestParams const* infoRequestParameters;  
    const char* playerId;  
    const char* playerSecret;  
    const char* publicKeyUrl;  
    const char* salt;  
    const char* signature;  
    const char* timestamp;  
} PFAuthenticationLoginWithGameCenterRequest;  
```

### 成員

**`createAccount`**   bool

如果目前沒有 PlayFab 帳戶連結至此識別碼，則自動建立一個。

**`customTags`**   PFStringDictionaryEntry const\*<br />*may be nullptr*

（選擇性）與要求相關聯的選擇性自訂標籤（例如組建編號、外部追蹤識別碼等）。

**`customTagsCount`**   uint32\_t

customTags 的計數

**`infoRequestParameters`**   PFGetPlayerCombinedInfoRequestParams const\*<br />*may be nullptr*

（選擇性）指定要為使用者傳回哪些資訊的旗標。

**`playerId`**   const char\*<br />*is null-terminated*

（選擇性）唯一的 Game Center 玩家識別碼。

**`playerSecret`**   const char\*<br />*is null-terminated*

（選擇性）用來驗證 API 要求簽章的玩家密碼。

**`publicKeyUrl`**   const char\*<br />*is null-terminated*

（選擇性）將用來驗證簽章之公開加密金鑰的 URL。

**`salt`**   const char\*<br />*is null-terminated*

（選擇性）用來計算雜湊並使其保持隨機的隨機值。

**`signature`**   const char\*<br />*is null-terminated*

（選擇性）驗證承載的驗證簽章。

**`timestamp`**   const char\*<br />*is null-terminated*

（選擇性）簽章建立日期和時間的整數表示法。PlayFab 會拒絕與伺服器目前時間相差超過 10 分鐘的驗證簽章。

## 需求

**標頭：** PFAuthenticationTypes.h

## 另請參閱

[PFAuthenticationTypes 成員](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

- [PFAuthenticationLoginWithGameCenterAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgamecenterasync.md)
- [PFAuthenticationReLoginWithGameCenterAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithgamecenterasync.md)
- [服務 C API 概觀 - PFAuthenticationTypes.h](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members.md)
- [PFAuthenticationLoginWithGameCenterGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgamecentergetresult.md)
- [PFAuthenticationLoginWithGameCenterGetResultSize](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgamecentergetresultsize.md)
