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

# PFAuthenticationLoginWithGameCenterAsync

> iOS Game Center のプレイヤー識別子を使用してユーザーをサインインさせ、以降認証済みユーザーを必要とする API 呼び出しに使用できるセッション識別子を返します。

iOS Game Center のプレイヤー識別子を使用してユーザーをサインインさせ、以降認証済みユーザーを必要とする API 呼び出しに使用できるセッション識別子を返します。このリクエストで省略可能なパラメーターである PublicKeyUrl、Salt、Signature、Timestamp を指定しない場合、Game Center ID でのログインは安全ではありません。PlayFab Game Manager の Apple Add-ons ページで「Require secure authentication only for this app」オプションを有効にして、すべての Game Center 呼び出しでこれらのパラメーターを必須とすることをお勧めします。

## 構文

```cpp theme={null}
HRESULT PFAuthenticationLoginWithGameCenterAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const PFAuthenticationLoginWithGameCenterRequest* request,  
    XAsyncBlock* async  
)  
```

### パラメーター

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigCreateHandle 呼び出しから返される PFServiceConfigHandle。

**`request`**   [PFAuthenticationLoginWithGameCenterRequest\*](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithgamecenterrequest)

値が設定されたリクエスト オブジェクト。

**`async`**   XAsyncBlock\*<br />*Inout*

非同期操作用の XAsyncBlock。

### 戻り値

型: HRESULT

この API 操作の結果コード。

## 解説

この API は iOS で利用できます。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 アカウントにはメール アドレスもユーザー名も関連付けられません。Game Center アカウントにリンクされた PlayFab アカウントがない場合はそれを示すエラーが返されるため、タイトルはユーザーを PlayFab アカウントの作成に誘導できます。無効な iOS Game Center プレイヤー識別子が使用された場合は、それを示すエラーが返されます。ClientLoginWithIOSDeviceIDAsync も参照してください。非同期タスクが完了したら、[PFAuthenticationLoginWithGameCenterGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgamecentergetresult) を呼び出して結果を取得します。

## 要件

**ヘッダー:** PFAuthentication.h

## 関連項目

[PFAuthentication のメンバー](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationLoginWithGameCenterGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgamecentergetresult.md)
- [PFAuthenticationLoginWithGameCenterGetResultSize](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithgamecentergetresultsize.md)
- [Services C API overview - PFAuthentication.h](/ja-jp/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationReLoginWithGameCenterAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithgamecenterasync.md)
- [PFAuthenticationLoginWithGameCenterRequest](/ja-jp/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithgamecenterrequest.md)
