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

# EmailIdentifierChallenge

> Universal Login の `email-identifier-challenge` 画面をカスタマイズするために利用できるすべてのフックとメソッドについて説明します。

`email-identifier-challenge` 画面は、ユーザーがメールアドレスに送信されたコードを入力して本人確認を行う必要がある場合に表示されます。ユーザーはコードを入力したり、再送したり、前のステップに戻ったりできます。

<Frame>
  <img style={{maxHeight:"400px"}} src="https://mintcdn.com/translations/mMSz-RNYLuOm2GmQ/docs/images/cdy7uua7fh8z/ACUL/Screenshot_2026-04-22_at_18.14.17.png?fit=max&auto=format&n=mMSz-RNYLuOm2GmQ&q=85&s=bc5b41d4236d95fb4e7b552d387fa90f" alt="ACUL Email Identifier Challenge" width="436" height="557" data-path="docs/images/cdy7uua7fh8z/ACUL/Screenshot_2026-04-22_at_18.14.17.png" />
</Frame>

<div id="import">
  ## インポート
</div>

各画面には、それぞれ独自のフックとメソッドがあります。SDK は、各画面で **部分インポート** と **ルートインポート** をサポートしています。

* 部分インポートを使うと、特定のユースケースに必要なコードだけを含められます。
* ルートインポートを使うと、単一のバンドルからすべての画面を読み込めるため、考えられるすべての画面に対応する統一ビルドを使いたい場合に便利です。

```jsx Import Example theme={null}
// ルートインポート
import { useEmailIdentifierChallenge } from '@auth0/auth0-acul-react';

// 部分インポート
import {
  useEmailIdentifierChallenge,
  // コンテキストフック
  useUser,
  useTenant,
  useBranding,
  useClient,
  useOrganization,
  usePrompt,
  useScreen,
  useTransaction,
  useUntrustedData,
  // 共通フック
  useCurrentScreen,
  useAuth0Themes,
  useErrors,
  useResend,
  // ユーティリティフック
  useChangeLanguage,
  // メソッド
  submitEmailChallenge,
  resendCode,
  returnToPrevious,
  switchToPassword,
} from '@auth0/auth0-acul-react/email-identifier-challenge';

function EmailIdentifierChallengeScreen() {
  const { submitEmailChallenge } = useEmailIdentifierChallenge();
  return (
    <button onClick={() => submitEmailChallenge({ code: '123456' })}>Submit</button>
  );
}
```

<div id="context-hooks">
  ## Context Hooks
</div>

`email-identifier-challenge` 画面で Auth0 のコンテキストデータへの読み取り専用アクセスを提供する、画面スコープのフックです。`@auth0/auth0-acul-react/email-identifier-challenge` からインポートします。

<ParamField body="useBranding" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/BrandingMembers">BrandingMembers</a></span>}>
  このフックは、`email-identifier-challenge` 画面に表示されるロゴ、色、テーマ設定などのブランディング設定を提供します。

  ```jsx Example theme={null}
  import { useBranding } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function CustomTheme() {
    const branding = useBranding();
  }
  ```
</ParamField>

<ParamField body="useClient" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/ClientMembers">ClientMembers</a></span>}>
  このフックは、`email-identifier-challenge` 画面の `id`、`name`、`logoUrl` など、クライアント関連の設定を提供します。

  ```jsx Example theme={null}
  import { useClient } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function AppInfo() {
    const client = useClient();
  }
  ```
</ParamField>

<ParamField body="useOrganization" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/OrganizationMembers">OrganizationMembers</a></span>}>
  このフックは、email challenge が組織スコープの場合に、ユーザーの組織に関する情報を提供します。組織コンテキストが存在しない場合は `null` を返します。

  ```jsx Example theme={null}
  import { useOrganization } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function OrgSelector() {
    const organization = useOrganization();
    if (!organization) {
      return <p>No Organization context</p>;
    }
  }
  ```
</ParamField>

<ParamField body="usePrompt" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/PromptMembers">PromptMembers</a></span>}>
  このフックには、認証フロー内の現在の prompt に関するデータが含まれます。

  ```jsx Example theme={null}
  import { usePrompt } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function FlowInfo() {
    const prompt = usePrompt();
  }
  ```
</ParamField>

<ParamField body="useScreen" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/ScreenMembersOnEmailIdentifierChallenge">ScreenMembersOnEmailIdentifierChallenge</a></span>}>
  このフックには、設定やコンテキストを含む `email-identifier-challenge` 画面固有の詳細が含まれます。

  ```jsx Example theme={null}
  import { useScreen } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function ScreenDebug() {
    const screen = useScreen();
  }
  ```
</ParamField>

<ParamField body="useTenant" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/TenantMembers">TenantMembers</a></span>}>
  このフックには、`id` や関連するメタデータなど、テナントに関するデータが含まれます。

  ```jsx Example theme={null}
  import { useTenant } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function TenantInfo() {
    const tenant = useTenant();
  }
  ```
</ParamField>

<ParamField body="useTransaction" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/TransactionMembers">TransactionMembers</a></span>}>
  このフックは、アクティブな接続や現在のフロー state など、`email-identifier-challenge` 画面に関するトランザクション固有のデータを提供します。

  ```jsx Example theme={null}
  import { useTransaction } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function TransactionInfo() {
    const transaction = useTransaction();
  }
  ```
</ParamField>

<ParamField body="useUntrustedData" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/UntrustedDataMembers">UntrustedDataMembers</a></span>}>
  このフックは、URL のクエリ文字列から事前入力されたパラメータなど、画面に渡される信頼できないデータを扱います。

  ```jsx Example theme={null}
  import { useUntrustedData } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function PrefilledForm() {
    const untrustedData = useUntrustedData();
  }
  ```
</ParamField>

<ParamField body="useUser" type={<span>() =&gt; <a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/UserMembers">UserMembers</a></span>}>
  このフックは、現在のユーザーに関する情報 (`username`、`email`、利用可能な認証方法など) を提供します。

  ```jsx Example theme={null}
  import { useUser } from '@auth0/auth0-acul-react/email-identifier-challenge';
  function UserProfile() {
    const user = useUser();
  }
  ```
</ParamField>

<ParamField body="useEmailIdentifierChallenge" type={<a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/EmailIdentifierChallengeMembers">EmailIdentifierChallengeMembers</a>}>
  このフックは、`email-identifier-challenge` 画面で利用できるすべてのメソッドとコンテキストを返します。
</ParamField>

<div id="methods">
  ## メソッド
</div>

<ParamField body="resendCode" type="Promise<void>">
  このメソッドは、ユーザーのメールアドレスに確認コードを再送します。

  ```jsx Example theme={null}
  import { useEmailIdentifierChallenge } from '@auth0/auth0-acul-react/email-identifier-challenge';

  function ResendButton() {
    const { resendCode } = useEmailIdentifierChallenge();
    return (
      <button onClick={() => resendCode()}>
        Resend Code
      </button>
    );
  }
  ```
</ParamField>

<ParamField body="returnToPrevious" type="Promise<void>">
  このメソッドは、ユーザーを認証フローの前のステップに戻します。

  ```jsx Example theme={null}
  import { useEmailIdentifierChallenge } from '@auth0/auth0-acul-react/email-identifier-challenge';

  function BackButton() {
    const { returnToPrevious } = useEmailIdentifierChallenge();
    return (
      <button onClick={() => returnToPrevious()}>
        Back
      </button>
    );
  }
  ```
</ParamField>

<ParamField body="switchToPassword" type="Promise<void>">
  認証フローをメール OTP による確認からパスワードベースの認証に切り替えます。

  ```jsx Example theme={null}
  import { useEmailIdentifierChallenge } from '@auth0/auth0-acul-react/email-identifier-challenge';

  function SwitchToPasswordButton() {
    const { switchToPassword } = useEmailIdentifierChallenge();
    return (
      <button onClick={() => switchToPassword()}>
        Use password instead
      </button>
    );
  }
  ```
</ParamField>

<ParamField body="submitEmailChallenge" type="Promise<void>">
  このメソッドは、ユーザーが入力したメール確認コードを送信します。

  ```jsx Example theme={null}
  import { useEmailIdentifierChallenge } from '@auth0/auth0-acul-react/email-identifier-challenge';

  function SubmitButton() {
    const { submitEmailChallenge } = useEmailIdentifierChallenge();
    return (
      <button onClick={() => submitEmailChallenge({ code: '123456' })}>
        Continue
      </button>
    );
  }
  ```

  **メソッドのパラメータ**

  <Expandable title="パラメータ">
    <ParamField body="options">
      [EmailChallengeOptions](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/EmailChallengeOptions)。
    </ParamField>

    <ParamField body="code" type="string" required>
      ユーザーのメールアドレスに送信された確認コード。
    </ParamField>

    <ParamField body="captcha?" type="string">
      このテナントで CAPTCHA が有効な場合の CAPTCHA 応答トークン。
    </ParamField>
  </Expandable>
</ParamField>

<div id="commonutility-hooks">
  ## 共通/ユーティリティフック
</div>

<ParamField body={<a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useAuth0Themes">useAuth0Themes</a>} type="フック">
  このフックは、ブランディングコンテキストからフラット化された設定を含む現在のテーマオプションを取得します。
</ParamField>

<ParamField body={<a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useChangeLanguage">useChangeLanguage</a>} type="フック">
  このフックは、現在のACUL画面の表示言語を変更する関数を返します。
</ParamField>

<ParamField body={<a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useCurrentScreen">useCurrentScreen</a>} type="フック">
  このフックは、現在の画面のコンテキストとstateを取得します。
</ParamField>

<ParamField body={<a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useErrors">useErrors</a>} type="フック">
  このフックは、画面上のサーバー、クライアント、開発者のエラーを読み取り、管理します。
</ParamField>

<ParamField body={<a href="/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useResend">useResend</a>} type="フック">
  このフックは、メール確認コードの再送stateとクールダウンロジックを管理します。
</ParamField>
