> ## Documentation Index
> Fetch the complete documentation index at: https://docs-staging-feat-docs-5612-expanded-grant-support-ea.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ユースケース：Formsを使用してプログレッシブプロファイルフォームを構成する

> Forms for Actionsを使用してプログレッシブプロファイルフォームを構成する方法を説明します。

<Card title="始める前に">
  1. 以下のスコープを有効にして、[マシンツーマシンアプリケーション](https://auth0.com/docs/get-started/auth0-overview/create-applications/machine-to-machine-apps)を作成します。

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

  2. マシンツーマシンアプリケーションの資格情報を使って[Vault接続](/docs/ja-jp/customize/forms/vault)を追加します。
</Card>

Forms for Actionsを使用すると、プログレッシブプロファイリングフローを作成して、会社名や役職などの不足している情報を収集し、それらを`user_metadata`属性として保管するようユーザーに求めるタイミングを決定できます。

<Frame>
  <img src="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tVfg_MI8K41OJw6A/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?fit=max&auto=format&n=tVfg_MI8K41OJw6A&q=85&s=d4f49bf2fe35057c72ca4fffdc3598c9" alt="Dashboard > Actions > Forms > Form" data-og-width="1404" width="1404" data-og-height="638" height="638" data-path="docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tVfg_MI8K41OJw6A/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=280&fit=max&auto=format&n=tVfg_MI8K41OJw6A&q=85&s=e64e5534389e3f1556d742aec5a52897 280w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tVfg_MI8K41OJw6A/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=560&fit=max&auto=format&n=tVfg_MI8K41OJw6A&q=85&s=1f193e32787fae1a171b83acbf2782d2 560w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tVfg_MI8K41OJw6A/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=840&fit=max&auto=format&n=tVfg_MI8K41OJw6A&q=85&s=90875916cec95252f273e76e932ab6b4 840w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tVfg_MI8K41OJw6A/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=1100&fit=max&auto=format&n=tVfg_MI8K41OJw6A&q=85&s=71cf314819f734a05cd68d7a799d9c6c 1100w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tVfg_MI8K41OJw6A/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=1650&fit=max&auto=format&n=tVfg_MI8K41OJw6A&q=85&s=bce2fa53dbe2f65348ff3d9605bde36f 1650w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tVfg_MI8K41OJw6A/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=2500&fit=max&auto=format&n=tVfg_MI8K41OJw6A&q=85&s=f12e9437c5830b596a01f7d880520b6f 2500w" />
</Frame>

以下のセクションでは、ノードとフローを使用してプログレッシブプロファイルフォームを作成する方法と、フォームを[ログイン後のアクション](/docs/ja-jp/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger)に追加する手順について説明します。

## フォームをゼロから作成する

情報を収集するためのフォームを作成するには、次の手順に従ってください。

1. **［Auth0 Dashboard］>［Actions（アクション）］>［Forms（フォーム）］** の順に選択して、フォームエディターを開きます。
2. **［Create Form（フォームを作成）］** > **［Start from scratch（初めから作成する）］** の順に選択します。

特に設定を変更しない限り、新しいフォームには開始ノード、ステップノード、および終了スクリーンノードが含まれます。

<Frame>
  <img src="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/146d8WIRxsdBJv7u/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?fit=max&auto=format&n=146d8WIRxsdBJv7u&q=85&s=00462e1c29b1687ee453510f8d678bf1" alt="Dashboard > Forms > Use Cases > Form" data-og-width="1234" width="1234" data-og-height="371" height="371" data-path="docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/146d8WIRxsdBJv7u/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=280&fit=max&auto=format&n=146d8WIRxsdBJv7u&q=85&s=ad6b930407aa44a78e5b79a29b97a68d 280w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/146d8WIRxsdBJv7u/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=560&fit=max&auto=format&n=146d8WIRxsdBJv7u&q=85&s=685557841a5f31eb35a2bfe41096e1fa 560w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/146d8WIRxsdBJv7u/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=840&fit=max&auto=format&n=146d8WIRxsdBJv7u&q=85&s=5c2273ab7a4e0027ae176022d9730334 840w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/146d8WIRxsdBJv7u/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=1100&fit=max&auto=format&n=146d8WIRxsdBJv7u&q=85&s=06902ae3bde8bd241367a7f044295ca0 1100w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/146d8WIRxsdBJv7u/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=1650&fit=max&auto=format&n=146d8WIRxsdBJv7u&q=85&s=f6d62478540b2ce03b70604ea11a87b1 1650w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/146d8WIRxsdBJv7u/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=2500&fit=max&auto=format&n=146d8WIRxsdBJv7u&q=85&s=859333044cd42f5b52941d69ebe0bf96 2500w" />
</Frame>

### ステップノードを構成する

ステップノードはユーザーに表示されるグラフィカルインターフェイスです。次の手順に従って、ステップノードに[フィールド](/docs/ja-jp/customize/forms/nodes-and-components)を追加し、ユーザーの会社名と役職の値を収集します。

1. **［Components menu（コンポーネントメニュー）］** から **［Rich text（リッチテキスト）］** フィールドを **Step（ステップ）** ノードにドラッグします。

   * **Rich text（リッチテキスト）** ：カスタムメッセージを入力します。

     * **例** ：`Complete your profile! We need you to complete your profile to personalize your experience.`（プロファイルの完成！エクスペリエンスをパーソナライズするには、プロファイルを完成させる必要があります。）
   * **［Save（保存）］** を選択します。
2. **Text（テキスト）** フィールドを **Step（ステップ）** ノードにドラッグします。

   * **Id** ：`company_name`を入力します。
   * **Label（ラベル）** ：チェックボックスを有効にします。
   * **Label（ラベル）** ：`Company name`（会社名）を入力します。
   * **Required（必須）** ：チェックボックスを有効にします。
   * **［Save（保存）］** を選択します。
3. **Text（テキスト）** フィールドを **Step（ステップ）** ノードにドラッグします。

   1. **Id** ：`job_title`を入力します。
   2. **Label（ラベル）** ：`Job title`（役職）を入力します。
   3. **Label（ラベル）** ：チェックボックスを有効にします。
   4. **Required（必須）** ：チェックボックスを有効にします。
   5. **［Save（保存）］** を選択します。
4. **［Publish（公開）］** を選択して保存します。

<Frame>
  <img src="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=3d49999b7e88236f871f11de48b010d6" alt="Dashboard > Actions > Forms > Form > Step node" data-og-width="1404" width="1404" data-og-height="533" height="533" data-path="docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=280&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=198c035c2958c55a3e00e6cedd308da9 280w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=560&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=16b9c8d9678f9ad2e96f1faca511e611 560w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=840&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=9c26a4b7f70b1fdd05fd8528df1bc859 840w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=1100&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=f9eda275fa8fd40a9549329e099c55a3 1100w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=1650&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=d022ce5746f4c4b33e0ab56aa8718ec0 1650w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=2500&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=6213f74c42a4af046f1ce76e7d025ac2 2500w" />
</Frame>

### フローノードを構成する

以下の手順に従って、 **Step（ステップ）** ノードの後に​​ **Flow（フロー）** ノードを追加し、`user_metadata`を更新して認証フローを再開します。

1. フォームエディターの下にある **［Flow（フロー）］** を選択します。
2. **Step（ステップ）** ノードと **Ending Screen（終了画面）** ノードの間にある既存のリンクを削除します。
3. 新たに **［Flow（フロー）］** \&gt **［Click to add a flow（クリックしてフローを追加する）］** > **［Create a new flow（新しいフローを作成する）］** を選択します。

   * **［Name（名前）］** フィールドに`Update user_metadata`（user\_metadata更新）と入力します。
   * **［Create（作成）］** を選択します。
   * **［Save（保存）］** を選択します。
4. 下の画像のように **Flow（フロー）** ノードを **Step（ステップ）** ノードと **Ending Screen（終了画面）** ノードにリンクします。
5. **［Publish（公開）］** を選択して保存します。

<Frame>
  <img src="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tE6jaj_PAvsV3OFe/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?fit=max&auto=format&n=tE6jaj_PAvsV3OFe&q=85&s=b2733f7efe0e92057a3c9486e27b7071" alt="Dashboard > Actions > Forms > Form" data-og-width="1404" width="1404" data-og-height="540" height="540" data-path="docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tE6jaj_PAvsV3OFe/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=280&fit=max&auto=format&n=tE6jaj_PAvsV3OFe&q=85&s=3a0c4f06a4ee0deb7d01c48a52dbb6fe 280w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tE6jaj_PAvsV3OFe/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=560&fit=max&auto=format&n=tE6jaj_PAvsV3OFe&q=85&s=9c10563af71aa91bbce5b1bf3db65ddc 560w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tE6jaj_PAvsV3OFe/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=840&fit=max&auto=format&n=tE6jaj_PAvsV3OFe&q=85&s=a7fae432ef52933200d6abd22eb767ba 840w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tE6jaj_PAvsV3OFe/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=1100&fit=max&auto=format&n=tE6jaj_PAvsV3OFe&q=85&s=174e304df0a9532e34588f3ebaca12a6 1100w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tE6jaj_PAvsV3OFe/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=1650&fit=max&auto=format&n=tE6jaj_PAvsV3OFe&q=85&s=728fdedd73611f563b662d2e4b5d44cc 1650w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/tE6jaj_PAvsV3OFe/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=2500&fit=max&auto=format&n=tE6jaj_PAvsV3OFe&q=85&s=7b677fc81de11c8db2131039fc6f6fd4 2500w" />
</Frame>

Auth0ユーザー更新アクションをフローに追加するには、次の手順に従います。

1. **［Update user\_metadata（user\_metadata更新）］** フローを選択してから **［Edit flow（フローの編集）］** を選択し、新しいタブにフローエディターを開きます。
2. アクションの **［Start（開始）］** の下にある **［+］** アイコンを選択し、 **Update user（ユーザー更新）** アクションを追加します。以下のフィールドに入力して、 **［Save（保存）］** を選択します。

   * **Connection（接続）** ：ドロップダウンからM2MアプリケーションへのVault接続を選択します。

   * **User ID（ユーザーID）** ：`{{context.user.user_id}}`と入力します。

   * **Body（ボディー）** ：以下のコードをコピーして貼り付け、`job_title`と`company_name`のプロパティを含むuser\_metadataを更新します。

     ```json lines theme={null}
      {
         "user_metadata": {
            "job_title": "{{fields.job_title}}",
            "company_name": "{{fields.company_name}}"
         }
      }
     ```

   * **［Save（保存）］** を選択します。
3. **［Publish（公開）］** を選択して保存します。

<Frame>
  <img src="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=51b84406a2e6f183140feb5963494816" alt="Dashboard > Actions > Forms > Flows" data-og-width="1404" width="1404" data-og-height="244" height="244" data-path="docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=280&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=ceb1a79e426175be2a23db84d8e5e67a 280w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=560&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=013d7f05afa00df0418f7e55e9be4aeb 560w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=840&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=2d4c9b3fee961e2efc50526eb1818ce0 840w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=1100&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=c25ac7b379776429001553d704e0c462 1100w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=1650&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=9f2c71c59cb0436b950b41b8129256a8 1650w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/Ib2yZSxMHKeCWOsR/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=2500&fit=max&auto=format&n=Ib2yZSxMHKeCWOsR&q=85&s=7847cf592f9745cce228f091091d303c 2500w" />
</Frame>

### フォームのレンダーコードを取得する

フォームのレンダーコードを取得して、カスタムのログイン後アクションでフォームを視覚的にレンダリングするには、以下の手順に従います。

* フォームエディターから **［Render（レンダー）］** を選択します。
* **［Copy（コピー）］** を選択します。

<Frame>
  <img src="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/1Q48o7VfoefEtE-u/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?fit=max&auto=format&n=1Q48o7VfoefEtE-u&q=85&s=e112854721d1814d3fde2e97d6820515" alt="Dashboard > Actions > Forms > Form > Embed" data-og-width="1400" width="1400" data-og-height="848" height="848" data-path="docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/1Q48o7VfoefEtE-u/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=280&fit=max&auto=format&n=1Q48o7VfoefEtE-u&q=85&s=b3c144da9615156d2c01eb9ac9a96d3c 280w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/1Q48o7VfoefEtE-u/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=560&fit=max&auto=format&n=1Q48o7VfoefEtE-u&q=85&s=d61d2c380dd63f02908be165a6e90847 560w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/1Q48o7VfoefEtE-u/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=840&fit=max&auto=format&n=1Q48o7VfoefEtE-u&q=85&s=c5beadd7047dde7236f559321df42712 840w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/1Q48o7VfoefEtE-u/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=1100&fit=max&auto=format&n=1Q48o7VfoefEtE-u&q=85&s=ac87112fec4a11273118b8bba989902b 1100w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/1Q48o7VfoefEtE-u/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=1650&fit=max&auto=format&n=1Q48o7VfoefEtE-u&q=85&s=9c5a43c2d18d81e204f4e358536e0462 1650w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/1Q48o7VfoefEtE-u/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=2500&fit=max&auto=format&n=1Q48o7VfoefEtE-u&q=85&s=00600d1a9bb801ebb91fb8dea3428aa9 2500w" />
</Frame>

## ログイン後のアクションを作成する

ログイン後のアクションを作成してフォームをレンダリングするには、次の手順に従います。

1. **［Auth0 Dashboard（Auth0ダッシュボード）］>［Actions（アクション）］>［Flows（フロー）］>［Login（ログイン）］** に移動します。
2. **［+］** アイコンを選択し、 **［Build from scratch（初めから構築する）］** を選択します。

   * **Name（名前）** ：`Render Progressive Profile Form`（プログレッシブプロファイルフォームのレンダリング）と入力します。
   * **Trigger（トリガー）** ：［`Login / Post Login`（ログイン/ログイン後）］を選択します。
   * **Runtime（ランタイム）** ：推奨バージョンを選択します。
3. **［Create（作成）］** を選択します。

ログイン後のアクションを構成するには、以下を行います。

1. 既存のコードをコードエディターから削除します。

2. フォームの埋め込みコードをコードエディターに貼り付けます。

3. コードを編集して、フォームをレンダリングする条件ロジックを定義します。

   ```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.stats.logins_count > 2 &&
       !event.user.user_metadata.company_name &&
       !event.user.user_metadata.job_title
     ) {
       api.prompt.render(FORM_ID);
     }
   }

   exports.onContinuePostLogin = async (event, api) => { }
   ```

   <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
     上の例にあるコードでは、ユーザーのログイン回数が3以上で、ユーザーのメタデータにcompany\_nameプロパティとjob\_titleプロパティがない場合にフォームが表示されます。
   </Callout>

4. **［Deploy（デプロイ）］** を選択します。

5. **Render Progressive Profile Form（プログレッシブプロファイルフォームのレンダリング）** アクションを **Login（ログイン）** フローにドラッグ＆ドロップします。

   <Frame>
     <img src="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/OXU-I0a_Gx2IrMmI/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?fit=max&auto=format&n=OXU-I0a_Gx2IrMmI&q=85&s=50fbab7e7e06ae0a7392f9629111e9c7" alt="Dashboard > Forms > Use Cases Progressive Profile Login Action" data-og-width="1079" width="1079" data-og-height="524" height="524" data-path="docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/OXU-I0a_Gx2IrMmI/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=280&fit=max&auto=format&n=OXU-I0a_Gx2IrMmI&q=85&s=0da523e27ecf1171907e964bf604a902 280w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/OXU-I0a_Gx2IrMmI/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=560&fit=max&auto=format&n=OXU-I0a_Gx2IrMmI&q=85&s=5097ae2b76d92e83e12835282f241a38 560w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/OXU-I0a_Gx2IrMmI/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=840&fit=max&auto=format&n=OXU-I0a_Gx2IrMmI&q=85&s=e7fd798262a25d9bad8617d0c84b8e13 840w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/OXU-I0a_Gx2IrMmI/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=1100&fit=max&auto=format&n=OXU-I0a_Gx2IrMmI&q=85&s=4148598b477955c8eb2f947af08257f6 1100w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/OXU-I0a_Gx2IrMmI/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=1650&fit=max&auto=format&n=OXU-I0a_Gx2IrMmI&q=85&s=c8694105c6568cf921f2322c2058c149 1650w, https://mintcdn.com/docs-staging-feat-docs-5612-expanded-grant-support-ea/OXU-I0a_Gx2IrMmI/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=2500&fit=max&auto=format&n=OXU-I0a_Gx2IrMmI&q=85&s=dfbac1277a42ec87d285edd8a18eca7c 2500w" />
   </Frame>

6. **［Apply（適用）］** を選択します。

### 実装をテストする

次の手順に従って実装をテストします。

1. ログインを3回以上実行済みで、`user_metadata`属性の`company_name`と`job_title`に値がない既存のユーザーでログインします。
2. ログインフローのログイン後アクションがフォームをレンダリングして、情報の入力を求めます。
3. **［Auth0 Dashboard］>［User Management（ユーザー管理）］>［Users（ユーザー）］** に移動し、ユーザーを見つけて、`user_metadata`属性の`company_name`と`job_title`に情報が含まれていることを確認します。
