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

> Describes how to configure push notifications for MFA.

# Configure Push Notifications for MFA

The [Guardian](/docs/secure/multi-factor-authentication/auth0-guardian) SDKs for [iOS](/docs/secure/multi-factor-authentication/auth0-guardian/guardian-for-ios-sdk) and [Android](/docs/secure/multi-factor-authentication/auth0-guardian/guardian-for-android-sdk) allow you to use a custom-built app for vendor-specific push notification services. You can configure push notifications for the AWS Simple Notification Service (SNS) platform or use Direct to Vendor services to add Firebase Cloud Messaging (FCM) and Apple Push Notification (APN) credentials directly in Auth0.

## AWS SNS Configuration

Before you configure push notifications, follow the prerequisites below:

1. [Create an SNS Platform Application](https://console.aws.amazon.com/sns/v3/home?region=us-east-1#/mobile/push-notifications/platform-applications) using AWS Management console and note it’s ARN.
2. Create an AWS Access Key ID authorized to create Platform Application endpoints. Guardian automatically creates a Platform Application endpoint with an appropriate device token as part of a successful enrollment.

### Configure push notifications with AWS SNS

To receive push notifications from Guardian, you first need to override Guardian's default SNS settings. Then, you can configure push notifications for Android and iOS.

1. On the Auth0 Dashboard, navigate to [Security > Multi-factor Auth](https://manage.auth0.com/#/security/mfa) and select **Push via Auth0 Guardian**. If the method is inactive, select the toggle at the top right to enable it.
2. Select **Custom** to reveal additional settings.
3. In the Push Notification Service section, choose **Amazon SNS.**

<Frame>
  <img src="https://mintcdn.com/generaltranslationinc/3E5d0TEwC25OF1Ek/docs/images/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/fbe7229dcc6f7d303a582520001b3dc1/Amazon_SNS.png?fit=max&auto=format&n=3E5d0TEwC25OF1Ek&q=85&s=6bde19122c6f66748d44bb4bed8f7bc9" alt="Auth0 Dashboard > Security > Multi-factor Auth > Guardian > Custom > Amazon SNS" data-og-width="884" width="884" data-og-height="543" height="543" data-path="docs/images/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/fbe7229dcc6f7d303a582520001b3dc1/Amazon_SNS.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/generaltranslationinc/3E5d0TEwC25OF1Ek/docs/images/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/fbe7229dcc6f7d303a582520001b3dc1/Amazon_SNS.png?w=280&fit=max&auto=format&n=3E5d0TEwC25OF1Ek&q=85&s=9d7292dc0f114fbac1b2d70c15b82434 280w, https://mintcdn.com/generaltranslationinc/3E5d0TEwC25OF1Ek/docs/images/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/fbe7229dcc6f7d303a582520001b3dc1/Amazon_SNS.png?w=560&fit=max&auto=format&n=3E5d0TEwC25OF1Ek&q=85&s=882f00a47ea62fb84013859f35d7aa79 560w, https://mintcdn.com/generaltranslationinc/3E5d0TEwC25OF1Ek/docs/images/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/fbe7229dcc6f7d303a582520001b3dc1/Amazon_SNS.png?w=840&fit=max&auto=format&n=3E5d0TEwC25OF1Ek&q=85&s=67ce4fcf0e379b2056f8729c3a484fe4 840w, https://mintcdn.com/generaltranslationinc/3E5d0TEwC25OF1Ek/docs/images/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/fbe7229dcc6f7d303a582520001b3dc1/Amazon_SNS.png?w=1100&fit=max&auto=format&n=3E5d0TEwC25OF1Ek&q=85&s=8119e793c9fe75f30c527260a2818d06 1100w, https://mintcdn.com/generaltranslationinc/3E5d0TEwC25OF1Ek/docs/images/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/fbe7229dcc6f7d303a582520001b3dc1/Amazon_SNS.png?w=1650&fit=max&auto=format&n=3E5d0TEwC25OF1Ek&q=85&s=a9d0b2eb88bff3d82a01e1eb7d5e77e6 1650w, https://mintcdn.com/generaltranslationinc/3E5d0TEwC25OF1Ek/docs/images/cdy7uua7fh8z/6PKSyH99GJ2CalJoG38sfZ/fbe7229dcc6f7d303a582520001b3dc1/Amazon_SNS.png?w=2500&fit=max&auto=format&n=3E5d0TEwC25OF1Ek&q=85&s=2a6a61a5d7334c4ee3fe4ff398e57874 2500w" />
</Frame>

1. In the Amazon SNS Configuration section, complete the following fields:

   <table class="table">
     <thead>
       <tr>
         <th><strong>Field</strong></th>
         <th><strong>Description</strong></th>
       </tr>
     </thead>

     <tbody>
       <tr>
         <td>AWS Access Key ID</td>
         <td>Your AWS Access Key ID.</td>
       </tr>

       <tr>
         <td>AWS Secret Access Key</td>
         <td>Your AWS Secret Access Key.</td>
       </tr>

       <tr>
         <td>AWS Region</td>
         <td>Your AWS application's region.</td>
       </tr>
     </tbody>
   </table>
2. Select **Save** to complete your changes.

## Configure push notifications for Android using FCM

<Tabs>
  <Tab title="Get FCM credentials">
    To configure Android push notifications on your Auth0 Dashboard, first retrieve your FCM server credentials. For full details, review Google's [Firebase documentation](https://firebase.google.com/docs/admin/setup#initialize-sdk).

    1. Navigate to the Firebase Console and select your applicable project.
    2. Open the **Settings** menu and choose **Service Accounts**.
    3. Select **Generate New Private Key** to download your credential file.

    After you retrieve your credentials, you can configure push notifications on your Auth0 Dashboard.
  </Tab>

  <Tab title="Configure Auth0 Dashboard">
    After retrieving your credentials, you can configure Android push notifications from your Auth0 Dashboard.

    1. Navigate to [Security > Multi-factor Auth](https://manage.auth0.com/#/guardian) and select **Push Notification using Auth0 Guardian**.
    2. In the Push Notification App section, select **Custom** to reveal additional settings.
    3. In the Android App Configuration section, configure the following:

           <table class="table">
             <thead>
               <tr>
                 <th><strong>Setting</strong></th>
                 <th><strong>Description</strong></th>
               </tr>
             </thead>

             <tbody>
               <tr>
                 <td>Enable Android App</td>
                 <td>Allows Auth0 to send push notifications to your custom application. If this option is not enabled, push notifications cannot be sent.</td>
               </tr>

               <tr>
                 <td>Google Play Store URL</td>
                 <td>Provide a link to the custom application users must download to configure MFA.</td>
               </tr>

               <tr>
                 <td>FCM Server Credentials</td>
                 <td>Upload your <a href="https://firebase.google.com/docs/admin/setup#initialize-sdk">FCM server credentials</a>.</td>
               </tr>
             </tbody>
           </table>
    4. Select **Save** to complete your changes.
  </Tab>
</Tabs>

## Configure push notifications for iOS using APNs

<Tabs>
  <Tab title="Get APN certificate">
    To configure iOS push notifications on your Auth0 Dashboard, first retrieve your APN certificate.

    1. Generate a [new APN certificate](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns#2947597) from your Apple developer account.

    2. Install the certificate locally.

    3. Find the **Apple Sandbox Push Services: {AppId}** certificate in your Keychain Access.

    4. Export the certificate and the associated private key to a P12 file without a password (default name: `Certificates.p12`).

    5. To generate a P12 file using Triple DES instead of RC2, run

       ```bash 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. Delete `Certificates.p12` and use `Certificate_3des.p12` as the APN certificate in the Auth0 Dashboard.

    After you retrieve your credentials, you can configure push notifications on your Auth0 Dashboard.
  </Tab>

  <Tab title="Configure Auth0 Dashboard">
    After retrieving your credentials, you can configure iOS push notifications from your Auth0 Dashboard.

    1. Navigate to [Security > Multi-factor Auth](https://manage.auth0.com/#/guardian) and select **Push Notification using Auth0 Guardian**.
    2. In the Push Notification App section, select **Custom** to reveal additional settings.
    3. In the iOS App Configuration section, configure the following:

           <table class="table">
             <thead>
               <tr>
                 <th><strong>Field</strong></th>
                 <th><strong>Description</strong></th>
               </tr>
             </thead>

             <tbody>
               <tr>
                 <td>Enable iOS App</td>
                 <td>Allows Auth0 to send push notifications to your custom application. If this option is not enabled, push notifications cannot be sent.</td>
               </tr>

               <tr>
                 <td>Apple App Store URL</td>
                 <td>Provide a link to the custom application users must download to configure MFA.</td>
               </tr>

               <tr>
                 <td>APNs Bundle ID</td>
                 <td>Provided by iOS Developer Console.</td>
               </tr>

               <tr>
                 <td>APNs Certificate</td>
                 <td>Upload your <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns">P12 certificate</a>.</td>
               </tr>

               <tr>
                 <td>iOS App Environment</td>
                 <td>Set this based on the configuration within your Apple developer account.</td>
               </tr>
             </tbody>
           </table>
    4. Select **Save** to complete your changes.
  </Tab>
</Tabs>

## Learn more

* [Auth0 Guardian](/docs/secure/multi-factor-authentication/auth0-guardian)
* [Guardian for Android SDK](/docs/secure/multi-factor-authentication/auth0-guardian/guardian-for-android-sdk)
* [Guardian.swift iOS SDK](/docs/secure/multi-factor-authentication/auth0-guardian/guardian-for-ios-sdk)
* [Create Custom Enrollment Tickets](/docs/secure/multi-factor-authentication/multi-factor-authentication-developer-resources/create-custom-enrollment-tickets)
* [Enroll and Challenge Push Authenticators](/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-and-challenge-push-authenticators)
