> ## 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

> PFAuthenticationLoginWithGameCenterRequest 数据模型。Game Center 玩家标识符。

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 帐户链接到此 ID，则自动创建一个。

**`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 玩家 ID。

**`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 成员](/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

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