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

# 二要素認証

> デバイス上の認証システム アプリを連携させて二要素サインイン検証を有効にすることで、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)** を選択します。

<img src="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" alt="Google - 2-Step Verification - Begin" width="540" height="960" data-path="images/playfab/identity/dev-identity/authentication/google-2-step-verification-begin.png" />

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

<img src="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" alt="Google - 2-Step Verification - Info Screen" width="540" height="960" data-path="images/playfab/identity/dev-identity/authentication/google-2-step-verification-info-screen.png" />

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

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

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

<img src="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" alt="Google - 2-Step Verification - Add account" width="540" height="960" data-path="images/playfab/identity/dev-identity/authentication/google-2-step-verification-add-account.png" />

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

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

<img src="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" alt="Game Manager - Dashboard - Open My Profile" width="1008" height="720" data-path="images/playfab/identity/dev-identity/authentication/game-manager-dashboard-open-my-profile.webp" />

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

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

<img src="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" alt="Game Manager - My Profile - Two-Factor Authentication" width="1282" height="837" data-path="images/playfab/identity/dev-identity/authentication/game-manager-my-profile-two-factor-authentication.png" />

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

<img src="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" alt="Google - Authenticator - Confirm verification code" width="540" height="960" data-path="images/playfab/identity/dev-identity/authentication/google-authenticator-confirm-verification-code.png" />

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

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

<img src="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" alt="Game Manager - My Profile - Enter Two-factor code" width="1282" height="837" data-path="images/playfab/identity/dev-identity/authentication/game-manager-my-profile-enter-two-factor-code.png" />

## テスト

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

<img src="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" alt="PlayFab - Login Screen" width="1144" height="699" data-path="images/playfab/identity/dev-identity/authentication/playfab-login-screen.png" />

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

<img src="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" alt="PlayFab - Enter Two-factor token" width="767" height="560" data-path="images/playfab/identity/dev-identity/authentication/playfab-enter-two-factor-token.png" />

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

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


## Related topics

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