> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-chore-rate-limits-autoupdate-0.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-dev-chore-rate-limits-autoupdate-0/pVnKie7w5nCfpdC7/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?fit=max&auto=format&n=pVnKie7w5nCfpdC7&q=85&s=f9916bdd67e77ff647ba337b93a7d2a8" 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-dev-chore-rate-limits-autoupdate-0/pVnKie7w5nCfpdC7/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=280&fit=max&auto=format&n=pVnKie7w5nCfpdC7&q=85&s=9cf94ca47d34a2ecfeb306d9443c8935 280w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/pVnKie7w5nCfpdC7/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=560&fit=max&auto=format&n=pVnKie7w5nCfpdC7&q=85&s=ba7c7f49862c651f2076e16eb5b64c17 560w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/pVnKie7w5nCfpdC7/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=840&fit=max&auto=format&n=pVnKie7w5nCfpdC7&q=85&s=5438ac63adc9170f164f976e0dae82af 840w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/pVnKie7w5nCfpdC7/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=1100&fit=max&auto=format&n=pVnKie7w5nCfpdC7&q=85&s=a7e7be6f26e4847119b7e69b07224ec5 1100w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/pVnKie7w5nCfpdC7/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=1650&fit=max&auto=format&n=pVnKie7w5nCfpdC7&q=85&s=2284b1470614dbd8e0b476667f004b20 1650w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/pVnKie7w5nCfpdC7/docs/images/ja-jp/cdy7uua7fh8z/xUx9YmnHvnAqL19JvNtNP/60dae88f893d4ebe8e3523421e960596/Progressive-profle-overview.png?w=2500&fit=max&auto=format&n=pVnKie7w5nCfpdC7&q=85&s=47a120525adc083f02c1578705d70b45 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-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=2630c459bd84d4ffa6f4097ff8cc1b9f" 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-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=280&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=d057ab375bef438aa3fed6d16b2111af 280w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=560&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=9a0cdf98005ed7240f8031e95b9bf77c 560w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=840&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=4d444984d18d141aa6a88677b3235e20 840w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=1100&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=e7962c16b21e95b93ed6db47ed936e69 1100w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=1650&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=185d6a3a9318fc0d72a5daa21f90ca07 1650w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2TZ9jSjgEcARFpULI6hz4R/a4319a1bd482f2ee5cc23100fdb2f42c/New-form-Forms-for-action-use-case.png?w=2500&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=6af3c22909148ad35c7982776402a1f9 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-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=329ec34b39d665d735a62c2db38423bb" 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-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=280&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=7fb5f7b706dbe36053af36da1b42f451 280w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=560&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=a847fc862d9e7dd1e0e680b427220559 560w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=840&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=a909c52b70f1222f4e78ac581205fa37 840w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=1100&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=79d18b9841f7674c3a386d7a9ea94f47 1100w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=1650&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=43f54abe9ff9f4505af01e044e604e54 1650w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/6H1lRzwKyYioQyQJ9MtIoM/aa248e92fc028a68a5b92ff361a11644/progressive-profile-step.png?w=2500&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=caf2ecb8ca7b9c619abae3e8b718c4fb 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-dev-chore-rate-limits-autoupdate-0/i9vTQLztevy7L5by/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?fit=max&auto=format&n=i9vTQLztevy7L5by&q=85&s=e767fb2f88ff4a912aa21033b0ae0a16" 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-dev-chore-rate-limits-autoupdate-0/i9vTQLztevy7L5by/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=280&fit=max&auto=format&n=i9vTQLztevy7L5by&q=85&s=9b8ed774d5a5e05570b1b4f3b6a9f74e 280w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/i9vTQLztevy7L5by/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=560&fit=max&auto=format&n=i9vTQLztevy7L5by&q=85&s=721267607c0f0a5422dfd12a32c65fe8 560w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/i9vTQLztevy7L5by/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=840&fit=max&auto=format&n=i9vTQLztevy7L5by&q=85&s=84386f036f64884acba4c0f468ebd676 840w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/i9vTQLztevy7L5by/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=1100&fit=max&auto=format&n=i9vTQLztevy7L5by&q=85&s=bd77879bb396b28f3a306579c244b4e0 1100w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/i9vTQLztevy7L5by/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=1650&fit=max&auto=format&n=i9vTQLztevy7L5by&q=85&s=9fc3d49f33a92a515725e9f7e7b381e6 1650w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/i9vTQLztevy7L5by/docs/images/ja-jp/cdy7uua7fh8z/5C91DaWn4LGtJT9BF87ssu/095171d0c452a287c44bfde12fd6d13f/link-nodes.png?w=2500&fit=max&auto=format&n=i9vTQLztevy7L5by&q=85&s=4bee9f524cd07cda2950cebe47a77485 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-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=a2931d977d375b2e996ba7fb4678488a" 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-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=280&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=006dcebbb187b401b099e86f83183d71 280w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=560&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=80ebf1eda7d1fb6572b6ba06bdaba7dc 560w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=840&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=ff7df6f0edc9e87a4604b7312a591eed 840w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=1100&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=8b2386342338982b7e7c8ccc95753fbe 1100w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=1650&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=da51e09e289ff6055fc99c21cdd2941e 1650w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/_4gYu-lC8hg6G1VB/docs/images/ja-jp/cdy7uua7fh8z/65Jx4W5oIZJyyvA8z4HqIx/0661b1a8ca6361c54fc4fef07ba59f0b/update-user.png?w=2500&fit=max&auto=format&n=_4gYu-lC8hg6G1VB&q=85&s=ef4da963e39db3120c7082ed887e1c35 2500w" />
</Frame>

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

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

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

<Frame>
  <img src="https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=af535be0218a456c8693c35a9a1d5ae7" 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-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=280&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=25b99079ad22f743e006119dafcbe2cb 280w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=560&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=dd53ef7a268c4da89db1dc40c5bc94ed 560w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=840&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=a112a1abd83a23bed17c13d436b723e7 840w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=1100&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=f2fbac773c4d881e085ab561f995dc61 1100w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=1650&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=4fc0df81e4750d1de7918d83307091d8 1650w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/3hcVpg1hG8zYZvow/docs/images/ja-jp/cdy7uua7fh8z/2EIUzc539sq9lwoTKbjoJv/496a864c0fc44a782c9cadca119dbfb0/embed.png?w=2500&fit=max&auto=format&n=3hcVpg1hG8zYZvow&q=85&s=18229f681f5a4034a17bdca93e8cc9bb 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-dev-chore-rate-limits-autoupdate-0/cDBH73pw9N1sNQfq/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?fit=max&auto=format&n=cDBH73pw9N1sNQfq&q=85&s=08c432433a3e099bcb8ed48da62d848b" 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-dev-chore-rate-limits-autoupdate-0/cDBH73pw9N1sNQfq/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=280&fit=max&auto=format&n=cDBH73pw9N1sNQfq&q=85&s=35aa12b51b3a4382c1136d96df4ddeff 280w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/cDBH73pw9N1sNQfq/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=560&fit=max&auto=format&n=cDBH73pw9N1sNQfq&q=85&s=6683b82741328f9fd7deb3372aaa2991 560w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/cDBH73pw9N1sNQfq/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=840&fit=max&auto=format&n=cDBH73pw9N1sNQfq&q=85&s=98dbe27d87318ad63e636134c4a7f9c5 840w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/cDBH73pw9N1sNQfq/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=1100&fit=max&auto=format&n=cDBH73pw9N1sNQfq&q=85&s=1c39cf721db2d8242ff4e181877848c8 1100w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/cDBH73pw9N1sNQfq/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=1650&fit=max&auto=format&n=cDBH73pw9N1sNQfq&q=85&s=b51c3b2b4284a70c6a3fbdb647fd39db 1650w, https://mintcdn.com/docs-dev-chore-rate-limits-autoupdate-0/cDBH73pw9N1sNQfq/docs/images/ja-jp/cdy7uua7fh8z/1QjjZdpTqTxx012UDN4xk9/99fba5ef4068a5688f1762eea7f42976/renderprogessiveprofile.png?w=2500&fit=max&auto=format&n=cDBH73pw9N1sNQfq&q=85&s=abaf5ffec02288142aef394b7cfaf18a 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`に情報が含まれていることを確認します。
