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

# 確認

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

`confirmation` 画面は、Auth0 が自動サインアップの対象となる可能性を検出した場合、OTP の検証後に表示されます。ユーザーはここでアカウントを作成するかどうかを確認できます。

![確認画面](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/ACUL/confirmation.png)

## インポート

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

* 部分インポートを使用すると、特定のユースケースに必要なコードだけを含めることができます。
* ルートインポートを使用すると、単一のバンドルからすべての画面を読み込めます。すべての画面を1つの統合ビルドで処理する場合に便利です。

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

// 部分インポート
import {
  useConfirmation,
  // コンテキストフック
  useUser,
  useTenant,
  useBranding,
  useClient,
  useOrganization,
  usePrompt,
  useScreen,
  useTransaction,
  useUntrustedData,
  useExperiment,
  // 共通フック
  useCurrentScreen,
  useAuth0Themes,
  useErrors,
  // ユーティリティフック
  useChangeLanguage,
  // メソッド
  proceedToSignup,
  goBack,
} from '@auth0/auth0-acul-react/confirmation';

function ConfirmationScreen() {
  const { proceedToSignup } = useConfirmation();
  return (
    <button onClick={() => proceedToSignup()}>
      Create Account
    </button>
  );
}
```

## コンテキストフック

`confirmation`画面で、Auth0のコンテキストデータに読み取り専用でアクセスするための画面スコープのフックです。`@auth0/auth0-acul-react/confirmation`からインポートします。

**useBranding** `() => [BrandingMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/BrandingMembers)`

このフックは、`confirmation`画面に表示されるロゴ、色、テーマ設定などのブランディング設定を提供します。

```jsx Example theme={null}
import { useBranding } from '@auth0/auth0-acul-react/confirmation';
function CustomTheme() {
  const branding = useBranding();
}
```

**useClient** `() => [ClientMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/ClientMembers)`

このフックは、`confirmation`画面の`id`、`name`、`logoUrl`など、クライアントに関する設定を提供します。

```jsx Example theme={null}
import { useClient } from '@auth0/auth0-acul-react/confirmation';
function AppInfo() {
  const client = useClient();
}
```

**useExperiment** `() => [ExperimentMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/ExperimentMembers)`

このフックは、`confirmation`画面で現在有効な[Experiment Center](/docs/docs/ja-jp/customize/experiment-center)の実験を提供します。有効な実験がない場合 (または画面が`context_configuration`でオプトインしていない場合) は`null`を返します。

```jsx Example theme={null}
import { useExperiment } from '@auth0/auth0-acul-react/confirmation';
function ExperimentBranch() {
  const experiment = useExperiment();
  if (!experiment) return null;
  return experiment.isControl ? <ControlUI /> : <TreatmentUI />;
}
```

**useOrganization** `() => [OrganizationMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/OrganizationMembers)`

このフックは、ユーザーの組織に関する情報を提供します。組織コンテキストがない場合は`null`を返します。

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

**usePrompt** `() => [PromptMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/PromptMembers)`

このフックには、認証フローにおける現在のプロンプトに関するデータが含まれます。

```jsx Example theme={null}
import { usePrompt } from '@auth0/auth0-acul-react/confirmation';
function FlowInfo() {
  const prompt = usePrompt();
}
```

**useScreen** `() => [ScreenMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/ScreenMembers)`

このフックには、設定やコンテキストなど、`confirmation`画面固有の詳細が含まれます。

```jsx Example theme={null}
import { useScreen } from '@auth0/auth0-acul-react/confirmation';
function ScreenDebug() {
  const screen = useScreen();
}
```

**useTenant** `() => [TenantMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/TenantMembers)`

このフックには、`id`や関連するメタデータなど、テナントに関するデータが含まれます。

```jsx Example theme={null}
import { useTenant } from '@auth0/auth0-acul-react/confirmation';
function TenantInfo() {
  const tenant = useTenant();
}
```

**useTransaction** `() => [TransactionMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/TransactionMembers)`

このフックは、有効な識別子やフローの状態など、`confirmation`画面に固有のトランザクションデータを提供します。

```jsx Example theme={null}
import { useTransaction } from '@auth0/auth0-acul-react/confirmation';
function TransactionInfo() {
  const transaction = useTransaction();
}
```

**useUntrustedData** `() => [UntrustedDataMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/UntrustedDataMembers)`

このフックは、URLパラメーターで事前入力されたフィールドなど、画面に渡される信頼されていないデータを処理します。

```jsx Example theme={null}
import { useUntrustedData } from '@auth0/auth0-acul-react/confirmation';
function PrefilledForm() {
  const untrustedData = useUntrustedData();
}
```

**useUser** `() => [UserMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/UserMembers)`

このフックは、`username`、`email`、利用可能な認証方法など、現在のユーザーの詳細を提供します。

```jsx Example theme={null}
import { useUser } from '@auth0/auth0-acul-react/confirmation';
function UserProfile() {
  const user = useUser();
}
```

**useConfirmation** `[ConfirmationMembers](/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Types/interfaces/ConfirmationMembers)`

このフックは、`confirmation`画面で利用できるすべてのメソッドとコンテキストを返します。

## メソッド

**proceedToSignup** `Promise\<void\>`

このメソッドは自動サインアップを確定し、OTPの検証後にアカウント作成に進みます。

```jsx Example theme={null}
import { useConfirmation } from '@auth0/auth0-acul-react/confirmation';

function ConfirmButton() {
  const { proceedToSignup } = useConfirmation();
  return (
    <button onClick={() => proceedToSignup()}>
      アカウントを作成
    </button>
  );
}
```

**goBack** `Promise\<void\>`

このメソッドは自動サインアップをキャンセルし、アカウントを作成せずにユーザーをログイン画面に戻します。

```jsx Example theme={null}
import { useConfirmation } from '@auth0/auth0-acul-react/confirmation';

function CancelButton() {
  const { goBack } = useConfirmation();
  return (
    <button onClick={() => goBack()}>
      戻る
    </button>
  );
}
```

## 共通ユーティリティフック

**[useAuth0Themes](/docs/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useAuth0Themes)** `Hooks`

このフックは、ブランディングコンテキストの設定をフラット化した現在のテーマオプションを取得します。

**[useChangeLanguage](/docs/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useChangeLanguage)** `Hooks`

このフックは、現在の ACUL 画面の表示言語を変更する関数を返します。

**[useCurrentScreen](/docs/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useCurrentScreen)** `Hooks`

このフックは、現在の画面のコンテキストと状態を取得します。

**[useErrors](/docs/docs/ja-jp/libraries/acul/react-sdk/API-Reference/Hooks/useErrors)** `Hooks`

このフックは、画面上のサーバーエラー、クライアントエラー、開発者エラーを読み取り、管理します。
