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

# MfaPushChallengePush

> Universal Login の `mfa-push-challenge-push` 画面をカスタマイズするために使用できる、すべてのプロパティとメソッドについて説明します。

MfaPushChallengePush クラスは、`mfa-push-challenge-push` 画面の機能を実装します。この画面は、MFA でユーザーがプッシュ通知を承認する必要がある場合に表示されます。

![ACUL MFA Push Challenge Push](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/ja-jp/cdy7uua7fh8z/6n6fftBZDpoT5FdmipebK6/3a777c3c9a87a6f6cf53cf96aab67c8d/Screenshot_2025-02-20_at_22.13.55.png)

## コンストラクター

MFA プッシュチャレンジのプッシュ画面マネージャーのインスタンスを生成します:

```typescript Example theme={null}
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();
await mfaPushChallengePush.continue();
```

## プロパティ

**branding** `[BrandingMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers)`

ブランディングテーマや設定など、branding 関連の構成を提供します。

**client** `[ClientMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/ClientMembers)`

`mfa-push-challenge-push` 画面向けに、`id`、`name`、`logoUrl` などのクライアント関連の構成を提供します。

**countryCodes** `[CountryCodesMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/CountryCodesMembers)`

電話番号入力用に、`available` や `recommended` などの国コードデータを `mfa-push-challenge-push` 画面向けに提供します。

**experiment** `[ExperimentMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/ExperimentMembers)`

この画面で有効な [Experiment Center](/docs/docs/ja-jp/customize/experiment-center) の実験です。有効な実験がない場合 (または画面が `context_configuration` を通じてオプトインしていない場合) は `null` です。

**organization** `[OrganizationMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers)`

ユーザーの Organization に関する情報 (`id` や `name` など) を提供します。

**prompt** `[PromptMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/PromptMembers)`

認証フローにおける現在の prompt に関するデータを含みます。

**screen** `[ScreenMembersOnMfaPushChallengePush](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnMfaPushChallengePush)`

設定やコンテキストなど、`mfa-push-challenge-push` 画面に固有の詳細を含みます。

**tenant** `[TenantMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/TenantMembers)`

`id` や関連するメタデータなど、tenant に関連するデータを含みます。

**transaction** `[TransactionMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/TransactionMembers)`

有効な identifier やフローの状態など、`mfa-push-challenge-push` 画面に固有の transaction データを提供します。

**untrustedData** `[UntrustedDataMembersOnMfaPushChallengePush](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembersOnMfaPushChallengePush)`

MFAプッシュチャレンジ中のユーザー入力など、SDK に渡される信頼できないデータを扱います。

**user** `[UserMembers](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/UserMembers)`

アクティブなユーザーの詳細 (`username`、`email`、`roles` など) を含みます。

## メソッド

**changeLanguage** `Promise\<void\>`

このメソッドは、Universal Login ページの表示言語を変更します。

```typescript Example theme={null}
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';
const mfaPushChallengePush = new MfaPushChallengePush();
mfaPushChallengePush.changeLanguage({
  language: 'fr',
});
```

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

**パラメーター**

**options**

[LanguageChangeOptions](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/LanguageChangeOptions)。

**language** `string` *required*

使用する言語の locale コード (例: `'en'`、`'fr'`、`'es'`) 。

**persist?** `"session"`

`'session'` に設定すると、選択した言語がセッション中は維持されます。

**continue** `Promise\<void\>`

このメソッドは、プッシュ通知 チャレンジ を続行します。

```typescript Example theme={null}
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();
await mfaPushChallengePush.continue();
```

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

**パラメーター**

**options**

[WithRememberOptions](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/WithRememberOptions)。

**rememberDevice?** `boolean`

デバイスを記憶するかどうかを指定します。

**enterCodeManually** `Promise\<void\>`

このメソッドは、確認コードを手動で入力する画面に切り替えます。

```typescript Example theme={null}
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();
await mfaPushChallengePush.enterCodeManually();
```

**getErrors** `[Error](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/Error)[]`

このメソッドは、コンテキスト から transaction エラーの配列を取得します。存在しない場合は空の配列を返します。

**pollingManager** `[MfaPushPollingControl](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/MfaPushPollingControl)`

このメソッドは、MFAプッシュチャレンジのポーリングを開始し、管理します。

指定された間隔でMFAプッシュチャレンジのエンドポイントを繰り返し確認するポーリングセッションを作成し、チャレンジが承認されるかエラーが発生するまで続行します。承認条件が満たされると、指定された[onCompleted](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/type-aliases/MfaPollingOptions#oncompleted)コールバックが呼び出され、ポーリングは自動的に停止します。

返される[MfaPushPollingControl](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/MfaPushPollingControl)を使用すると、いつでもポーリング処理の開始、停止、またはステータスの確認ができます。

以下を備えた[MfaPushPollingControl](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/MfaPushPollingControl)インスタンスを返します:

* `startPolling()` — ポーリングを開始または再開します。
* `stopPolling()` — ポーリングを即座にキャンセルします。
* `isRunning()` — ポーリングが現在実行中かどうかを示します。

```typescript Example theme={null}
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();

// プッシュチャレンジが承認されるまで5秒ごとにポーリングを開始
const control = mfaPushChallengePush.pollingManager({
  intervalMs: 5000,
  onCompleted: () => mfaPushChallengePush.continue(),
  onError: (error) => console.error('Polling error:', error),
});

// 後で必要に応じてポーリングをキャンセル
control.stopPolling();
```

**備考**

* HTTP 429 (レート制限) レスポンスは内部的に処理されます。ポーリングは再試行の前に、レート制限がリセットされるまで自動的に待機します。
* `startPolling()`は複数回呼び出しても安全です。すでに実行中の場合は何も起こりません。

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

**パラメーター**

**options**

[MfaPollingOptions](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/type-aliases/MfaPollingOptions)。

**intervalMs?** `number`

連続するポーリングリクエストの間隔をミリ秒単位で指定する省略可能な値です。省略した場合は、SDKの内部デフォルト間隔 (通常は5000ミリ秒) が使用されます。

**onCompleted()?** `() =\> void`

MFAプッシュチャレンジが正常に承認されてポーリングが完了したときに実行される、任意のコールバックです。呼び出されるのは1回だけで、その後ポーリングは自動的に停止します。

**onError()?** `(error) =\> void`

ポーリング中にエラーが発生した場合に呼び出される任意のコールバックです。`status` (HTTPステータスコード) と`responseText` (生のレスポンス本文) を含む`ULError`オブジェクトを受け取ります。

**resendPushNotification** `Promise\<void\>`

ユーザーのモバイルデバイスにプッシュ通知を再送します。

このメソッドは、新しいプッシュ通知の送信をAuth0に要求するフォームを送信します。Auth0がこのスクリーンを再度レンダリングするため、ブラウザーでページが再読み込みされ、コンポーネントの状態、タイマー、実行中のポーリングなどのJavaScriptのコンテキストはすべて失われます。

`resendPushNotification()`を呼び出す際は、以下の点に注意してください:

* `await resendPushNotification()`の後に実行されるコードで設定した状態 (「通知を送信しました」というメッセージなど) は、保持されることを前提にできません。
* サーバー側のエラーは、ページの再読み込み後に`transaction.errors`に格納されます。これらのエラーによって、返されたPromiseがrejectされることはありません。
* 返されたPromiseは、フォームが送信された時点 (ページの再読み込み前) でresolveします。このPromiseは、Auth0が新しい通知を送信したことを保証するものではありません。

```typescript Example theme={null}
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();
await mfaPushChallengePush.resendPushNotification();
```

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

**パラメーター**

**options**

[WithRememberOptions](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/WithRememberOptions)。

**rememberDevice?** `boolean`

デバイスを記憶するかどうかを示します。

**tryAnotherMethod** `Promise\<void\>`

このメソッドを使用すると、ユーザーは別のMFA方式を試すことができます。

```typescript Example theme={null}
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();
await mfaPushChallengePush.tryAnotherMethod();
```
