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

# MFA用プッシュ通知を構成する

> MFAにプッシュ通知を構成する方法について説明します。

[iOS](/docs/ja-JP/ja-jp/secure/multi-factor-authentication/auth0-guardian/guardian-for-ios-sdk)と[Android](/docs/ja-JP/ja-jp/secure/multi-factor-authentication/auth0-guardian/guardian-for-android-sdk)用の[Guardian](/docs/ja-JP/ja-jp/secure/multi-factor-authentication/auth0-guardian)SDKにより、ベンダー固有のプッシュ通知サービス用にカスタムビルドしたアプリを使用することができます。AWSのSimple Notification Service（SNS）プラットフォーム用のプッシュ通知を構成するか、DTV（Direct to Vendor）サービスを使用して、Firebase Cloud Messaging（FCM）およびApple Push Notification（APN）の資格情報をAuth0に直接追加できます。

<div id="aws-sns-configuration">
  ## AWS SNSの構成
</div>

プッシュ通知を構成する前に、以下の前提条件に従ってください。

1. AWS Managementコンソールを使用して[SNSプラットフォームアプリケーションを作成](https://console.aws.amazon.com/sns/v3/home?region=us-east-1#/mobile/push-notifications/platform-applications)し、そのARNをメモします。
2. プラットフォームアプリケーションエンドポイントを作成するために、認可されたAWSアクセスキーIDを作成します。Guardianは登録成功の一環として、適切なデバイストークンでプラットフォームアプリケーションエンドポイントを自動作成します。

<div id="configure-push-notifications-with-aws-sns">
  ### AWS SNSでプッシュ通知を構成する
</div>

Guardianからプッシュ通知を受け取るには、まずGuardianのデフォルトのSNS設定を上書きする必要があります。その後、AndroidとiOS用のプッシュ通知を構成することができます。

1. Auth0 Dashboardから、[［Security（セキュリティ）］>［Multi-factor Auth（多要素認証）］](https://manage.auth0.com/#/security/mfa)に移動し、**［Push via Auth0 Guardian（Auth0 Guardian経由でプッシュ）］** を選択します。メソッドが非アクティブの場合は、右上にあるトグルで有効にします。
2. **［Custom（カスタム）］** を選択し、追加設定を表示します。
3. ［Push Notification Service（プッシュ通知サービス）］セクションで **［Amazon SNS］** を選択します。

<Frame>
  <img src="https://mintcdn.com/generaltranslationinc/UCtxRPLKKGiAgiWv/docs/images/ja-jp/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/43644347942a224b271008b358afde0c/2025-01-27_11-22-59.png?fit=max&auto=format&n=UCtxRPLKKGiAgiWv&q=85&s=90c3ac7d1dd38d894065a62e8d1ffd3b" alt="［Auth0 Dashboard］ > ［Security（セキュリティ）］ > ［Multi-factor Auth（多要素認証）］ > ［Guardian］ > ［Custom（カスタム）］ > ［Amazon SNS］" data-og-width="2006" width="2006" data-og-height="1254" height="1254" data-path="docs/images/ja-jp/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/43644347942a224b271008b358afde0c/2025-01-27_11-22-59.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/generaltranslationinc/UCtxRPLKKGiAgiWv/docs/images/ja-jp/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/43644347942a224b271008b358afde0c/2025-01-27_11-22-59.png?w=280&fit=max&auto=format&n=UCtxRPLKKGiAgiWv&q=85&s=bd959b6c9471bdfd218a8115cd097b42 280w, https://mintcdn.com/generaltranslationinc/UCtxRPLKKGiAgiWv/docs/images/ja-jp/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/43644347942a224b271008b358afde0c/2025-01-27_11-22-59.png?w=560&fit=max&auto=format&n=UCtxRPLKKGiAgiWv&q=85&s=4f41cf751694bb7b6b8ff48f410084e8 560w, https://mintcdn.com/generaltranslationinc/UCtxRPLKKGiAgiWv/docs/images/ja-jp/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/43644347942a224b271008b358afde0c/2025-01-27_11-22-59.png?w=840&fit=max&auto=format&n=UCtxRPLKKGiAgiWv&q=85&s=44a3805435e17a031d46f09971711d99 840w, https://mintcdn.com/generaltranslationinc/UCtxRPLKKGiAgiWv/docs/images/ja-jp/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/43644347942a224b271008b358afde0c/2025-01-27_11-22-59.png?w=1100&fit=max&auto=format&n=UCtxRPLKKGiAgiWv&q=85&s=99ee199d1ccf99481d6ade43103446a4 1100w, https://mintcdn.com/generaltranslationinc/UCtxRPLKKGiAgiWv/docs/images/ja-jp/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/43644347942a224b271008b358afde0c/2025-01-27_11-22-59.png?w=1650&fit=max&auto=format&n=UCtxRPLKKGiAgiWv&q=85&s=b560095bcc3ad8b18dc1aca44ea3ac0e 1650w, https://mintcdn.com/generaltranslationinc/UCtxRPLKKGiAgiWv/docs/images/ja-jp/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/43644347942a224b271008b358afde0c/2025-01-27_11-22-59.png?w=2500&fit=max&auto=format&n=UCtxRPLKKGiAgiWv&q=85&s=ef548aeb4855f67af30f50830599b9b5 2500w" />
</Frame>

1. ［Amazon SNS Configuration（Amazon SNS構成）］セクションで、次のフィールドに入力します。

   <table class="table">
     <thead>
       <tr>
         <th><strong>フィールド</strong></th>
         <th><strong>説明</strong></th>
       </tr>
     </thead>

     <tbody>
       <tr>
         <td>AWSアクセスキーID</td>
         <td>自身のAWSアクセスキーID。</td>
       </tr>

       <tr>
         <td>AWSシークレットアクセスキー</td>
         <td>自身のAWSシークレットアクセスキー。</td>
       </tr>

       <tr>
         <td>AWSリージョン</td>
         <td>自身のAWSアプリケーションのリージョン。</td>
       </tr>
     </tbody>
   </table>
2. **［Save（保存）］** を選択して変更を完了します。

<div id="configure-push-notifications-for-android-using-fcm">
  ## FCMを使用してAndroid用のプッシュ通知を構成する
</div>

<Tabs>
  <Tab title="FCMの資格情報の取得">
    Auth0 DashboardでAndroidのプッシュ通知を構成するには、まずFCMサーバーの資格情報を取得します。詳細については、Googleの「[Firebaseドキュメント](https://firebase.google.com/docs/admin/setup#initialize-sdk)」を参照してください。

    1. Firebaseコンソールに移動し、該当プロジェクトを選択します。
    2. **［Settings（設定）］** メニューを開き、**［Service Accounts（サービスアカウント）］** を選択してください。
    3. **［Generate New Private Key（新しい秘密鍵を生成）］** を選択すると、資格情報ファイルをダウンロードすることができます。

    資格情報を取得したあと、Auth0 Dashboardでプッシュ通知を構成することができます。
  </Tab>

  <Tab title="Auth0 Dashboardの構成">
    資格情報を取得したあと、Auth0 DashboardからAndroidのプッシュ通知を構成することができます。

    1. [［Security（セキュリティ）］ > ［Multi-factor Auth（多要素認証）］](https://manage.auth0.com/#/guardian)に移動し、**［Push Notification using Auth0 Guardian（Auth0 Guardianを使ったプッシュ通知）］** を選択します。
    2. ［Push Notification App（プッシュ通知アプリ）］セクションから、**［Custom（カスタム）］** を選択し、追加設定を取得します。
    3. ［Android App Configuration（Androidアプリ構成）］セクションで次の設定を行います。

           <table class="table">
             <thead>
               <tr>
                 <th><strong>設定</strong></th>
                 <th><strong>説明</strong></th>
               </tr>
             </thead>

             <tbody>
               <tr>
                 <td>Androidアプリの有効化</td>
                 <td>Auth0がカスタムアプリケーションにプッシュ通知を送ることを許可します。このオプションを有効にしない場合、プッシュ通知は送信されません。</td>
               </tr>

               <tr>
                 <td>Google PlayストアのURL</td>
                 <td>MFAの構成のためにユーザーがダウンロードする必要があるカスタムアプリケーションへのリンクを提供します。</td>
               </tr>

               <tr>
                 <td>FCMサーバーの資格情報</td>
                 <td>\[FCMサーバーの資格情報]（[https://firebase.google.com/docs/admin/setup#initialize-sdk）をアップロードします。](https://firebase.google.com/docs/admin/setup#initialize-sdk）をアップロードします。)</td>
               </tr>
             </tbody>
           </table>
    4. **［Save（保存）］** を選択して、変更を完了します。
  </Tab>
</Tabs>

<div id="configure-push-notifications-for-ios-using-apns">
  ## APNを使用してiOS用のプッシュ通知を構成する
</div>

<Tabs>
  <Tab title="APN証明書の取得">
    Auth0 DashboardでiOSのプッシュ通知を構成するには、まずAPN証明書を取得します。

    1. Apple開発者アカウントから[新しいAPN証明書](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns#2947597)を生成します。

    2. 証明書を自分のデバイスにインストールします。

    3. キーチェーンアクセスで、**Apple Sandboxプッシュサービス：｛Appld｝** 証明書を見つけます。

    4. パスワードを入力せずP12ファイルへ証明書と関連秘密鍵をエクスポートします（デフォルト名：`Certificates.p12`）。

    5. RC2の代わりにTriple DESを使用してP12ファイルを生成するには、

       ```lines theme={null}
       openssl pkcs12 -in Certificates.p12 -legacy -nocerts -nodes -out pk.pem -passin pass:"" &&
       openssl pkcs12 -in Certificates.p12 -legacy -nokeys -out cert.crt -passin pass:"" &&
       openssl pkcs12 -export -inkey pk.pem -in cert.crt -descert -out Certificate_3des.p12 -passout pass:"" &&
       rm pk.pem cert.crt
       ```

    6. `Certificates.p12`を削除して、Auth0 DashboardのAPN証明書として`Certificate_3des.p12`を使用します。

    資格情報を取得したあと、Auth0 Dashboardでプッシュ通知を構成することができます。
  </Tab>

  <Tab title="Auth0 Dashboardの構成">
    資格情報を取得したあと、Auth0 DashboardからiOSのプッシュ通知を構成することができます。

    1. [［Security（セキュリティ）］ > ［Multi-factor Auth（多要素認証）］](https://manage.auth0.com/#/guardian)に移動し、**［Push Notification using Auth0 Guardian（Auth0 Guardianを使ったプッシュ通知）］** を選択します。
    2. ［Push Notification App（プッシュ通知アプリ）］セクションから、**［Custom（カスタム）］** を選択し、追加設定を取得します。
    3. ［iOS App Configuration（iOSアプリ構成）］セクションで次の設定を行います。

           <table class="table">
             <thead>
               <tr>
                 <th><strong>フィールド</strong></th>
                 <th><strong>説明</strong></th>
               </tr>
             </thead>

             <tbody>
               <tr>
                 <td>iOSアプリの有効化</td>
                 <td>Auth0がカスタムアプリケーションにプッシュ通知を送ることを許可します。このオプションを有効にしない場合、プッシュ通知は送信されません。</td>
               </tr>

               <tr>
                 <td>Apple AppストアのURL</td>
                 <td>MFAの構成のためにユーザーがダウンロードする必要があるカスタムアプリケーションへのリンクを提供します。</td>
               </tr>

               <tr>
                 <td>APNのバンドルID</td>
                 <td>iOS Developer Console提供。</td>
               </tr>

               <tr>
                 <td>APNの証明書</td>
                 <td><a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns">P12証明書</a>をアップロードします。</td>
               </tr>

               <tr>
                 <td>iOSアプリ環境</td>
                 <td>Appleの開発者アカウントで構成したものに基づいて設定します。</td>
               </tr>
             </tbody>
           </table>
    4. **［Save（保存）］** を選択して、変更を完了します。
  </Tab>
</Tabs>

<div id="learn-more">
  ## もっと詳しく
</div>

* [Auth0 Guardian](/docs/ja-JP/ja-jp/secure/multi-factor-authentication/auth0-guardian)
* [Guardian for Android SDK](/docs/ja-JP/ja-jp/secure/multi-factor-authentication/auth0-guardian/guardian-for-android-sdk)
* [Guardian.swift iOS SDK](/docs/ja-JP/ja-jp/secure/multi-factor-authentication/auth0-guardian/guardian-for-ios-sdk)
* [カスタム登録チケットを作成する](/docs/ja-JP/ja-jp/secure/multi-factor-authentication/multi-factor-authentication-developer-resources/create-custom-enrollment-tickets)
* [プッシュAuthenticatorの登録とチャレンジ](/docs/ja-JP/ja-jp/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-and-challenge-push-authenticators)
