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

# 二要素認証

> デバイス上の認証システム アプリを連携させて二要素サインイン検証を有効にすることで、PlayFab Game Manager アカウントにセキュリティのレイヤーを追加します。

二要素認証を使うと、認証プロセスにもう 1 つのステップを追加することで、PlayFab Game Manager アカウントのセキュリティを強化できます。

これは、認証プロセスにデバイス要素を追加することで実現します。この目的で特別に登録された特定のデバイスを所有している場合にのみ認証を可能にします。

## 二要素認証を構成する

**二要素認証** アプリをデバイスにインストールします。自分でアプリを検索するか、次のリストからプラットフォームを選択してください。

* [iPhone、iPad、iPod Touch](https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8)
* [Android フォンまたはタブレット](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2)
* [Windows フォンまたはタブレット](https://www.windowsphone.com/store/app/authenticator/e7994dbc-2336-4950-91ba-ca22d653759b)

手順はすべてのプラットフォームで基本的に同じです。この例では、Android ベースのデバイスと Google Authenticator アプリケーションを示しています。

アプリケーションをダウンロードしたら:

* 開いて指示に従います。
* **Begin** ボタン **(1)** を選択します。

![Google - 2-Step Verification - Begin](https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/identity/dev-identity/authentication/google-2-step-verification-begin.png?fit=max\&auto=format\&n=Oa_DP1q6U1lat7c2\&q=85\&s=a7c71f915f0f800a6bebd30167ee6df1)

もし指示がある場合、アプリのチュートリアルに従ってください **(1)**。

![Google - 2-Step Verification - Info Screen](https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/identity/dev-identity/authentication/google-2-step-verification-info-screen.png?fit=max\&auto=format\&n=Oa_DP1q6U1lat7c2\&q=85\&s=770edfba65b1b677acc7096643b722ee)

* 次に、PlayFab アカウントを追加するために、2 つのオプションのうち 1 つを選択します。

* **バーコード (1)** をスキャンします。

* または、**キー** を手動で入力します **(2)**。

![Google - 2-Step Verification - Add account](https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/identity/dev-identity/authentication/google-2-step-verification-add-account.png?fit=max\&auto=format\&n=Oa_DP1q6U1lat7c2\&q=85\&s=2a697a05f0766ca2ab04229217d0d5b9)

どちらのオプションを選択した場合でも、PlayFab の Web サイトに移動し、**Game Manager** に移動します。**Dashboard** タブで:

* **Account** パネル **(1)** を選択します。
* 次に **My Profile (2)** を選択します。

![Game Manager - Dashboard - Open My Profile](https://mintcdn.com/microsoft-4404708b/fZvLNnT4WAs1io9f/images/playfab/identity/dev-identity/authentication/game-manager-dashboard-open-my-profile.webp?fit=max\&auto=format\&n=fZvLNnT4WAs1io9f\&q=85\&s=5300ee6ce6ed9994ea5d8ff7e0b114f5)

**Account** 設定が開きます。

* **Enable two-factor authentication** チェックボックスがオンになっていることを確認します。
* 選択したオプションに応じて、デバイス上のアプリケーションを使って新しいアカウントを追加するために、**コード (1)** または **バーコード (2)** を使用します。

![Game Manager - My Profile - Two-Factor Authentication](https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/identity/dev-identity/authentication/game-manager-my-profile-two-factor-authentication.png?fit=max\&auto=format\&n=Oa_DP1q6U1lat7c2\&q=85\&s=75c008985bf14baea64efef07b145738)

完了すると、二要素コードが表示されます。

![Google - Authenticator - Confirm verification code](https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/identity/dev-identity/authentication/google-authenticator-confirm-verification-code.png?fit=max\&auto=format\&n=Oa_DP1q6U1lat7c2\&q=85\&s=096a8a7fa752d2a4d474d4f1b0d28c2a)

PlayFab **Game Manager** の **Profile** 設定に戻ります。

* 受け取った **コード** を入力します **(1)**。
* **Save Profile** ボタンを選択します **(2)**。

![Game Manager - My Profile - Enter Two-factor code](https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/identity/dev-identity/authentication/game-manager-my-profile-enter-two-factor-code.png?fit=max\&auto=format\&n=Oa_DP1q6U1lat7c2\&q=85\&s=118a842e37af1e72cfd88e83cabe754b)

## テスト

PlayFab アカウントからログアウトし、再度ログインを試みます。認証プロセスの最初のステップは通常通りに見えます (以下の例を参照)。

![PlayFab - Login Screen](https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/identity/dev-identity/authentication/playfab-login-screen.png?fit=max\&auto=format\&n=Oa_DP1q6U1lat7c2\&q=85\&s=752c44de2c42fa2812bf1a1c42804e84)

2 番目のステップでは二要素コードの入力が求められます。コードはいつでも利用可能で、デバイスにインストールしたアプリケーションを使用してアクセスできます。

![PlayFab - Enter Two-factor token](https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/identity/dev-identity/authentication/playfab-enter-two-factor-token.png?fit=max\&auto=format\&n=Oa_DP1q6U1lat7c2\&q=85\&s=501a24afaeb3d28dd70b94e661198a6d)

正しい二要素コードを入力すると、ログインできるはずです。

これで PlayFab の二要素認証のセットアップは完了です。


## Related topics

- [Certification PC BVT ガイド](https://docs.xbox.com/ja-jp/publishing/game-publishing/concepts/certification/certification-pc-bvt-guide.md)
- [PlayFab API 用の Microsoft Entra ID 認証](https://docs.xbox.com/ja-jp/services/playfab/identity/dev-identity/authentication/entra-id-api-authentication.md)
- [Game Manager リファレンス](https://docs.xbox.com/ja-jp/services/playfab/live-service-management/gamemanager/reference.md)
- [<Package> 要素](https://docs.xbox.com/ja-jp/build/core-features/common/packaging/deployment/deployment-element-package.md)
- [<Chunk> 要素](https://docs.xbox.com/ja-jp/build/core-features/common/packaging/deployment/deployment-element-chunk.md)
