> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-feat-docs-5607-tenant-acl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cas d’utilisation : Configurer un formulaire de politique de mise à jour à l’aide des formulaires.

> Configurer un formulaire de politique de mise à jour à l’aide des formulaires pour Actions.

<Card title="Avant de commencer">
  1. Créez une [application machine-machine](https://auth0.com/docs/get-started/auth0-overview/create-applications/machine-to-machine-apps) avec les permissions suivantes activées :

  * `read:users`
  * `update:users`
  * `create:users`
  * `read:users_app_metadata`
  * `update:users_app_metadata`
  * `create:users_app_metadata`

  2. Ajoutez une [Connexion au coffre-fort](/docs/fr-ca/customize/forms/vault) en utilisant les informations d’identification de l’application machine-machine (M-M).
</Card>

Les formulaires pour Actions vous permettent de créer des flux de politiques de confidentialité personnalisés et de stocker le consentement avec l’objet `app_metadata` .

<Frame>
  <img src="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6i68dMvHDTijfRmSgN1x8Q/ad900e7d4c0fb34645921435472b8684/privavy-policy-form.png?fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=64ced2668b85d6b8683136ba0a0e87c2" alt="Dashboard > Actions > Forms > Privacy policy use case" data-og-width="1404" width="1404" data-og-height="638" height="638" data-path="docs/images/fr-ca/cdy7uua7fh8z/6i68dMvHDTijfRmSgN1x8Q/ad900e7d4c0fb34645921435472b8684/privavy-policy-form.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6i68dMvHDTijfRmSgN1x8Q/ad900e7d4c0fb34645921435472b8684/privavy-policy-form.png?w=280&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=a49a776585325fedce0e4c38ff5f361f 280w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6i68dMvHDTijfRmSgN1x8Q/ad900e7d4c0fb34645921435472b8684/privavy-policy-form.png?w=560&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=abcbe51748a0e74a847db27b98cd5933 560w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6i68dMvHDTijfRmSgN1x8Q/ad900e7d4c0fb34645921435472b8684/privavy-policy-form.png?w=840&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=380e0d49c09ac427b08a00271ca28fa9 840w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6i68dMvHDTijfRmSgN1x8Q/ad900e7d4c0fb34645921435472b8684/privavy-policy-form.png?w=1100&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=30a12f63b166c0a5588361ab0798b1f8 1100w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6i68dMvHDTijfRmSgN1x8Q/ad900e7d4c0fb34645921435472b8684/privavy-policy-form.png?w=1650&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=09947e1c61729a19e2c9d65f053a4325 1650w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6i68dMvHDTijfRmSgN1x8Q/ad900e7d4c0fb34645921435472b8684/privavy-policy-form.png?w=2500&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=7bb6880e1efad15e5272a620c4dfdcc6 2500w" />
</Frame>

Les sections ci-dessous décrivent comment créer un formulaire de politique de mise à jour en utilisant des nœuds et des flux, ainsi que les étapes pour ajouter votre formulaire à une action [post-connexion](/docs/fr-ca/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger).

## Créer un formulaire à partir de zéro

Suivez ces étapes pour créer un formulaire afin de recueillir des informations :

1. Ouvrez l’éditeur de formulaires en sélectionnant **Auth0 Dashboard (tableau de bord Auth0) > Actions > Forms (formulaires).**
2. Sélectionnez **Créer un formulaire** > **Commencer à partir de zéro**.

Par défaut, un nouveau formulaire contient un nœud Début, un nœud Étape et un nœud Éran fin.

<Frame>
  <img src="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/VeBiAmxvSLRiWOBQ/docs/images/fr-ca/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?fit=max&auto=format&n=VeBiAmxvSLRiWOBQ&q=85&s=9aef7c73d32a1c5671ea29185c41161a" alt="Dashboard > Forms > Use Cases > Form" data-og-width="1234" width="1234" data-og-height="371" height="371" data-path="docs/images/fr-ca/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/VeBiAmxvSLRiWOBQ/docs/images/fr-ca/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=280&fit=max&auto=format&n=VeBiAmxvSLRiWOBQ&q=85&s=8ac950a86b32e41843dd10fae45bd3d1 280w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/VeBiAmxvSLRiWOBQ/docs/images/fr-ca/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=560&fit=max&auto=format&n=VeBiAmxvSLRiWOBQ&q=85&s=bd1b108dff686b227f1e721c23f8150e 560w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/VeBiAmxvSLRiWOBQ/docs/images/fr-ca/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=840&fit=max&auto=format&n=VeBiAmxvSLRiWOBQ&q=85&s=35c2b041fefd1cdba1eadb40a65a5905 840w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/VeBiAmxvSLRiWOBQ/docs/images/fr-ca/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=1100&fit=max&auto=format&n=VeBiAmxvSLRiWOBQ&q=85&s=24a8da3cae21d837ba0fc40e3298650d 1100w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/VeBiAmxvSLRiWOBQ/docs/images/fr-ca/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=1650&fit=max&auto=format&n=VeBiAmxvSLRiWOBQ&q=85&s=028cecbd5d4c84de50df1a7e76d371b8 1650w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/VeBiAmxvSLRiWOBQ/docs/images/fr-ca/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=2500&fit=max&auto=format&n=VeBiAmxvSLRiWOBQ&q=85&s=3ffaf2aeb26261d2d5b82aad6fa1724b 2500w" />
</Frame>

### Configurer le nœud d’étape

Le nœud d’étape est l’interface graphique visible par les utilisateurs. Ajoutez des [champs](/docs/fr-ca/customize/forms/nodes-and-components) au nœud d’étape pour recueillir la nouvelle valeur d’acceptation de l’accord en suivant ces étapes :

1. Faites glisser un champ **Rich text (Texte enrichi)** depuis le **Components menu (Menu composants)** dans le nœud **d’étape**.

   * **Rich text (Texte enrichi)**: Saisissez une description des mises à jour de vos politiques de confidentialité.
   * Sélectionnez **Save (Enregistrer)**.
2. Faites glisser un champ **Legal (Légal)** dans le nœud **d’étape** .

   * **Identification** : Saisissez `privacy_policies`.
   * **Obligatoire** : Cochez la case.
   * **Légal** : Saisissez `J’accepte la politique de confidentialité`.
   * Sélectionnez **Save (Enregistrer)**.
3. Sélectionnez **Publish (Publier)** pour enregistrer.

<Frame>
  <img src="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/et5jRBz-GsQQ58zS/docs/images/fr-ca/cdy7uua7fh8z/59zFFjQjAnjogkc2QGIqqJ/0ad66b1b636544122aa4e65968b76c2c/privacy-policy-step-node.png?fit=max&auto=format&n=et5jRBz-GsQQ58zS&q=85&s=a7a57d51922bf8b3a658af528f18f90b" alt="Dashboard > Actions > Forms > Use case privacy policy step node" data-og-width="1404" width="1404" data-og-height="559" height="559" data-path="docs/images/fr-ca/cdy7uua7fh8z/59zFFjQjAnjogkc2QGIqqJ/0ad66b1b636544122aa4e65968b76c2c/privacy-policy-step-node.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/et5jRBz-GsQQ58zS/docs/images/fr-ca/cdy7uua7fh8z/59zFFjQjAnjogkc2QGIqqJ/0ad66b1b636544122aa4e65968b76c2c/privacy-policy-step-node.png?w=280&fit=max&auto=format&n=et5jRBz-GsQQ58zS&q=85&s=f4b7a6fe1a973da029b7e6ec6057f461 280w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/et5jRBz-GsQQ58zS/docs/images/fr-ca/cdy7uua7fh8z/59zFFjQjAnjogkc2QGIqqJ/0ad66b1b636544122aa4e65968b76c2c/privacy-policy-step-node.png?w=560&fit=max&auto=format&n=et5jRBz-GsQQ58zS&q=85&s=238d3cf3a1be39b3460f72a13ddf038e 560w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/et5jRBz-GsQQ58zS/docs/images/fr-ca/cdy7uua7fh8z/59zFFjQjAnjogkc2QGIqqJ/0ad66b1b636544122aa4e65968b76c2c/privacy-policy-step-node.png?w=840&fit=max&auto=format&n=et5jRBz-GsQQ58zS&q=85&s=f8c6b06b82852b595b1ce3d108d4dd35 840w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/et5jRBz-GsQQ58zS/docs/images/fr-ca/cdy7uua7fh8z/59zFFjQjAnjogkc2QGIqqJ/0ad66b1b636544122aa4e65968b76c2c/privacy-policy-step-node.png?w=1100&fit=max&auto=format&n=et5jRBz-GsQQ58zS&q=85&s=045657c3187ae262c98dfcac09d8b16c 1100w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/et5jRBz-GsQQ58zS/docs/images/fr-ca/cdy7uua7fh8z/59zFFjQjAnjogkc2QGIqqJ/0ad66b1b636544122aa4e65968b76c2c/privacy-policy-step-node.png?w=1650&fit=max&auto=format&n=et5jRBz-GsQQ58zS&q=85&s=45719ea410b78e7775d46b797c8d72e1 1650w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/et5jRBz-GsQQ58zS/docs/images/fr-ca/cdy7uua7fh8z/59zFFjQjAnjogkc2QGIqqJ/0ad66b1b636544122aa4e65968b76c2c/privacy-policy-step-node.png?w=2500&fit=max&auto=format&n=et5jRBz-GsQQ58zS&q=85&s=68bf04db52024d24ff19e1b45b4ded91 2500w" />
</Frame>

### Configurez le nœud Flow

Ajoutez un node **Flow** après le nœud **d’étape** pour mettre à jour les `app_metadata` et reprendre le flux d’authentification en suivant ces étapes :

1. Sélectionnez **Flow (Flux)** en bas de Form Editor (Éditeur de formulaire).
2. Supprimez le lien existant entre les nœuds **Step (Étape)** et **Ending Screen (Écran de fin)**.
3. Sélectionnez le nouveau **Flow (Flux)** > **Click to add a flow (Cliquer pour ajouter un flux)** > **Create a new flow (Créer un nouveau flux).**

   * Entrez `Update app_metadata (Mettre à jour app_metadata)` dans le champ **Name (Nom)**.
   * Sélectionnez **Create (Créer)**.
   * Sélectionnez **Save (Enregistrer)**.
4. Liez le nœud **Flow (Flux)** aux nœuds **Step (Étape)** et **Ending Screen (Écran de fin)** comme illustré ci-dessous.
5. Sélectionnez **Publish (Publier)** pour enregistrer.

<Frame>
  <img src="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6YIkzm7SrpM9LW76AXuRzh/353c518fe82bbaa440836da1d83596d6/link-policies.png?fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=7bd61baf687c617ddd0747e41da4c746" alt="Dashboard > Actions > Forms > Form" data-og-width="1404" width="1404" data-og-height="599" height="599" data-path="docs/images/fr-ca/cdy7uua7fh8z/6YIkzm7SrpM9LW76AXuRzh/353c518fe82bbaa440836da1d83596d6/link-policies.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6YIkzm7SrpM9LW76AXuRzh/353c518fe82bbaa440836da1d83596d6/link-policies.png?w=280&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=2694ceb9e547e391539844e0973c46a2 280w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6YIkzm7SrpM9LW76AXuRzh/353c518fe82bbaa440836da1d83596d6/link-policies.png?w=560&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=6363860f56b5c0ac68ca280d93d9f3c0 560w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6YIkzm7SrpM9LW76AXuRzh/353c518fe82bbaa440836da1d83596d6/link-policies.png?w=840&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=28e13370a79d9d4a02a42da4ebecf539 840w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6YIkzm7SrpM9LW76AXuRzh/353c518fe82bbaa440836da1d83596d6/link-policies.png?w=1100&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=d389bc19a522d180bc4a6522ff2964db 1100w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6YIkzm7SrpM9LW76AXuRzh/353c518fe82bbaa440836da1d83596d6/link-policies.png?w=1650&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=3a74565a874c916bb8e9feca9107e0be 1650w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9n22KDYcK2jQtoGR/docs/images/fr-ca/cdy7uua7fh8z/6YIkzm7SrpM9LW76AXuRzh/353c518fe82bbaa440836da1d83596d6/link-policies.png?w=2500&fit=max&auto=format&n=9n22KDYcK2jQtoGR&q=85&s=9fbd4fd8be1dfc7c1e3d0d7a6ae1883a 2500w" />
</Frame>

Ajoutez une action de mise à jour d’utilisateur Auth0 au flux en suivant ces étapes :

1. Sélectionnez le **fluxUpdate app\_metadata (Mise à jour de app\_metadata)** > **Edit flow (Modifier le flux)** pour ouvrir l’éditeur de flux dans un nouvel onglet.
2. Sous l’Action **Start (Démarrage)**, sélectionnez l’icône **+** pour ajouter une Action **Update user (Mise à jour de l’utilisateur)** . Remplissez les champs ci-dessous, puis sélectionnez **Save (Enregistrer)** pour continuer.

   * **Connection** : dans la liste déroulante, sélectionnez la connexion au coffre-fort de votre application de communication entre machines.

   * **User ID** (ID utilisateur) : Saisissez `{{context.user.user_id}}`.

   * **Corps** : Copiez et collez le code suivant pour mettre à jour les app\_metadata avec les propriétés privacy\_policies et privacy\_policies\_timestamp.

     ```
     {
       "app_metadata": {
         "privacy_policies": true,
         "privacy_policies_timestamp": "{{ functions.toTimestamp() }}"
       }
     }
     ```

   * Sélectionnez **Save (Enregistrer)**.
3. Sélectionnez **Publish (Publier)** pour enregistrer.

<Frame>
  <img src="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9a5z73A7qeND7mR0/docs/images/fr-ca/cdy7uua7fh8z/CvMNIwWrOUwaFW4X3G28p/1fb70ae57a20749d9ffaaba8dc0b7e26/update-user-privacy.png?fit=max&auto=format&n=9a5z73A7qeND7mR0&q=85&s=fb9e68aac6a89ef93f1a7d0e8dfb2e1d" alt="Dashboard > Actions > Forms > User case privacy policy code" data-og-width="1404" width="1404" data-og-height="338" height="338" data-path="docs/images/fr-ca/cdy7uua7fh8z/CvMNIwWrOUwaFW4X3G28p/1fb70ae57a20749d9ffaaba8dc0b7e26/update-user-privacy.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9a5z73A7qeND7mR0/docs/images/fr-ca/cdy7uua7fh8z/CvMNIwWrOUwaFW4X3G28p/1fb70ae57a20749d9ffaaba8dc0b7e26/update-user-privacy.png?w=280&fit=max&auto=format&n=9a5z73A7qeND7mR0&q=85&s=15c78fa4e46c2b9afc4b4f9290f6a28b 280w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9a5z73A7qeND7mR0/docs/images/fr-ca/cdy7uua7fh8z/CvMNIwWrOUwaFW4X3G28p/1fb70ae57a20749d9ffaaba8dc0b7e26/update-user-privacy.png?w=560&fit=max&auto=format&n=9a5z73A7qeND7mR0&q=85&s=60b5635942c703ca561e041aade61199 560w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9a5z73A7qeND7mR0/docs/images/fr-ca/cdy7uua7fh8z/CvMNIwWrOUwaFW4X3G28p/1fb70ae57a20749d9ffaaba8dc0b7e26/update-user-privacy.png?w=840&fit=max&auto=format&n=9a5z73A7qeND7mR0&q=85&s=c1909e7c85cb0729061952236c97caa6 840w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9a5z73A7qeND7mR0/docs/images/fr-ca/cdy7uua7fh8z/CvMNIwWrOUwaFW4X3G28p/1fb70ae57a20749d9ffaaba8dc0b7e26/update-user-privacy.png?w=1100&fit=max&auto=format&n=9a5z73A7qeND7mR0&q=85&s=f872fc8b2f9ad794b107fafb6cf88bd8 1100w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9a5z73A7qeND7mR0/docs/images/fr-ca/cdy7uua7fh8z/CvMNIwWrOUwaFW4X3G28p/1fb70ae57a20749d9ffaaba8dc0b7e26/update-user-privacy.png?w=1650&fit=max&auto=format&n=9a5z73A7qeND7mR0&q=85&s=175e39195f3d97587447b89e8e9239f8 1650w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/9a5z73A7qeND7mR0/docs/images/fr-ca/cdy7uua7fh8z/CvMNIwWrOUwaFW4X3G28p/1fb70ae57a20749d9ffaaba8dc0b7e26/update-user-privacy.png?w=2500&fit=max&auto=format&n=9a5z73A7qeND7mR0&q=85&s=722888fbca843c89c7fd2a28c4ea1b8e 2500w" />
</Frame>

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  Le flux **Update app\_metadata** ajoute une valeur `privacy_policies true` à l’objet `app_metadata` et génère également un horodatage à l’aide d’une [fonction d’assistance](/docs/fr-ca/customize/forms/variables)
</Callout>

## Récupérer le code de rendu du formulaire

Récupérez votre code de rendu du formulaire pour afficher visuellement le formulaire avec une Action post-connexion personnalisée en suivant ces étapes :

* Dans l’éditeur de formulaire, sélectionnez **\<> Render (Rendre)**.
* Sélectionnez **Copy (Copier)**.

<Frame>
  <img src="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/j9Ibe-tdBc1sfin0/docs/images/fr-ca/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?fit=max&auto=format&n=j9Ibe-tdBc1sfin0&q=85&s=e00d873c918e4629246e4c57f77ae5eb" alt="Dashboard > Actions > Forms > Form > Embed" data-og-width="1400" width="1400" data-og-height="848" height="848" data-path="docs/images/fr-ca/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/j9Ibe-tdBc1sfin0/docs/images/fr-ca/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=280&fit=max&auto=format&n=j9Ibe-tdBc1sfin0&q=85&s=778751d388fe32d3f985327cfb0a9f2f 280w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/j9Ibe-tdBc1sfin0/docs/images/fr-ca/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=560&fit=max&auto=format&n=j9Ibe-tdBc1sfin0&q=85&s=bf478c0a3f1fe3651e70ec9a8e31960f 560w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/j9Ibe-tdBc1sfin0/docs/images/fr-ca/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=840&fit=max&auto=format&n=j9Ibe-tdBc1sfin0&q=85&s=20643e3d8d318eb926734308b6f888e9 840w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/j9Ibe-tdBc1sfin0/docs/images/fr-ca/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=1100&fit=max&auto=format&n=j9Ibe-tdBc1sfin0&q=85&s=b2f31752fb37ab16cb0275f1c66629a8 1100w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/j9Ibe-tdBc1sfin0/docs/images/fr-ca/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=1650&fit=max&auto=format&n=j9Ibe-tdBc1sfin0&q=85&s=bcf3f1aaa5fd0817dba0ea8db536c3f9 1650w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/j9Ibe-tdBc1sfin0/docs/images/fr-ca/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=2500&fit=max&auto=format&n=j9Ibe-tdBc1sfin0&q=85&s=7c21313906df564df19be299141dd56a 2500w" />
</Frame>

## Créer une action post-connexion

Créez une action post-connexion pour afficher votre formulaire en suivant ces étapes :

1. Naviguez vers **Auth0 Dashboard > Actions > Flows (Flux) > Login (Connexion).**
2. Sélectionnez l’icône **+** et choisissez **Build from scratch (Construire à partir de zéro)**:

   * **Name (Nom)** : Saisissez `Render Update Policy Form (Formulaire de politique de mise à jour du rendu)`.
   * **Déclencheur** : Sélectionnez `Login / Post Login (Connexion / Post-connexion)`.
   * **Runtime (Temps d’exécution)** : Sélectionnez la version recommandée.
3. Sélectionnez **Create (Créer)**.

Pour configurer l’action post-connexion.

1. Supprimez le code existant dans l’éditeur de code.

2. Collez le code de rendu du formulaire dans l’éditeur de code.

3. Modifiez le code pour définir la logique conditionnelle d’affichage du formulaire.

   ```javascript lines theme={null}
   /**
   * @param {Event} event - Details about the user and the context in which they are logging in.
   * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
   */
   exports.onExecutePostLogin = async (event, api) => {
     const FORM_ID = 'REPLACE_WITH_YOUR_FORM_ID';

     if (event.user.app_metadata.privacy_policies !== true) {
       api.prompt.render(FORM_ID);
     }
   }

   exports.onContinuePostLogin = async (event, api) => { }
   ```

   <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
     L’exemple de code ci-dessus affiche le formulaire lorsque la propriété `privacy_policies` ne se trouve pas dans les métadonnées de l’application.
   </Callout>

4. Sélectionnez **Deploy (Déployer)**.

5. Glissez et déposez l’Action **Render Update Policy Form (Formulaire de mise à jour de la politique de rendu)** dans le flux de **Login (Connexion)** .

   <Frame>
     <img src="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/KwYHpG-_jJvP0JVq/docs/images/fr-ca/cdy7uua7fh8z/5TOwDgevZsBqd7yZynUYWU/41ca909dc3007aed4f40ff794a05efa5/postlogin.png?fit=max&auto=format&n=KwYHpG-_jJvP0JVq&q=85&s=51a4900bdaf46c714247e27d17a4be77" alt="Dashboard > Forms > Use Case > Render update policy form login action" data-og-width="1370" width="1370" data-og-height="668" height="668" data-path="docs/images/fr-ca/cdy7uua7fh8z/5TOwDgevZsBqd7yZynUYWU/41ca909dc3007aed4f40ff794a05efa5/postlogin.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/KwYHpG-_jJvP0JVq/docs/images/fr-ca/cdy7uua7fh8z/5TOwDgevZsBqd7yZynUYWU/41ca909dc3007aed4f40ff794a05efa5/postlogin.png?w=280&fit=max&auto=format&n=KwYHpG-_jJvP0JVq&q=85&s=b355215fe9dc5a91bcf68620aa9fec60 280w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/KwYHpG-_jJvP0JVq/docs/images/fr-ca/cdy7uua7fh8z/5TOwDgevZsBqd7yZynUYWU/41ca909dc3007aed4f40ff794a05efa5/postlogin.png?w=560&fit=max&auto=format&n=KwYHpG-_jJvP0JVq&q=85&s=6bc7f525af1df8e9b27a53a1debe942a 560w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/KwYHpG-_jJvP0JVq/docs/images/fr-ca/cdy7uua7fh8z/5TOwDgevZsBqd7yZynUYWU/41ca909dc3007aed4f40ff794a05efa5/postlogin.png?w=840&fit=max&auto=format&n=KwYHpG-_jJvP0JVq&q=85&s=4c7f6ee3c132a25ef09d8a75416d60ce 840w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/KwYHpG-_jJvP0JVq/docs/images/fr-ca/cdy7uua7fh8z/5TOwDgevZsBqd7yZynUYWU/41ca909dc3007aed4f40ff794a05efa5/postlogin.png?w=1100&fit=max&auto=format&n=KwYHpG-_jJvP0JVq&q=85&s=c57ba6004a4e2496985ac27aac3528a9 1100w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/KwYHpG-_jJvP0JVq/docs/images/fr-ca/cdy7uua7fh8z/5TOwDgevZsBqd7yZynUYWU/41ca909dc3007aed4f40ff794a05efa5/postlogin.png?w=1650&fit=max&auto=format&n=KwYHpG-_jJvP0JVq&q=85&s=165106b7f9199ecb455b688764844ec0 1650w, https://mintcdn.com/docs-dev-feat-docs-5607-tenant-acl/KwYHpG-_jJvP0JVq/docs/images/fr-ca/cdy7uua7fh8z/5TOwDgevZsBqd7yZynUYWU/41ca909dc3007aed4f40ff794a05efa5/postlogin.png?w=2500&fit=max&auto=format&n=KwYHpG-_jJvP0JVq&q=85&s=4a588da7542024112b8960ef9ecd660d 2500w" />
   </Frame>

6. Sélectionnez **Apply (Appliquer).**

### Test de mise en œuvre

Testez la mise en œuvre en suivant les étapes ci-dessous :

1. Se connecter avec un utilisateur existant dont l’attribut `privacy_policies` de `app_metadata` n’a pas de valeur.
2. L’action post-connexion dans le flux de connexion rendra le formulaire et demandera l’approbation.
3. Sélectionnez **Auth0 Dashboard > User Management (Gestion des utilisateurs) > Users (Utilisateurs),** localisez l’utilisateur et vérifiez que l’attribut `app_metadata``privacy_policies` contient une valeur `true` et un horodatage.
