メインコンテンツへスキップ
MfaPushChallengePush クラスは、mfa-push-challenge-push 画面の機能を実装します。この画面は、MFA 中にユーザーがプッシュ通知を確認する必要がある場合に表示されます。
ACUL MFA Push Challenge Push

コンストラクター

MFA Push Challenge Push画面マネージャーのインスタンスを作成します:
Example
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

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

プロパティ

ブランディングテーマや各種設定など、ブランディング関連の構成を提供します。
mfa-push-challenge-push 画面の idnamelogoUrl など、クライアントに関する構成を提供します。
idname など、ユーザーの組織に関する情報を提供します。
認証フロー内の現在のプロンプトに関するデータが含まれます。
構成やコンテキストなど、mfa-push-challenge-push 画面に固有の詳細が含まれます。
id や関連するメタデータなど、テナントに関するデータが含まれます。
アクティブな識別子やフローの状態など、mfa-push-challenge-push 画面のトランザクション固有データを提供します。
MFA プッシュチャレンジ中のユーザー入力など、SDK に渡される信頼されていないデータを扱います。
usernameemailroles など、アクティブなユーザーの詳細が含まれます。

メソッド

changeLanguage
Promise<void>
このメソッドは、Universal Login ページの表示言語を変更します。
Example
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';
const mfaPushChallengePush = new MfaPushChallengePush();
mfaPushChallengePush.changeLanguage({
  language: 'fr',
});
メソッドパラメーター
continue
Promise<void>
このメソッドは、プッシュ通知チャレンジを続行します。
Example
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();
await mfaPushChallengePush.continue();
メソッドパラメーター
enterCodeManually
Promise<void>
このメソッドは、確認コードを手動で入力する画面に切り替えます。
Example
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();
await mfaPushChallengePush.enterCodeManually();
getErrors
このメソッドは、コンテキストからトランザクションエラーの配列を取得します。エラーがない場合は空の配列を返します。
このメソッドは、MFA プッシュチャレンジのポーリングを開始し、管理します。指定した間隔で MFA プッシュチャレンジのエンドポイントを繰り返し確認するポーリングセッションを作成し、チャレンジが承認されるかエラーが発生するまで継続します。承認条件が満たされると、指定した onCompleted コールバックが呼び出され、ポーリングは自動的に停止します。返される MfaPushPollingControl を使用すると、ポーリング処理の開始、停止、状態確認をいつでも行えます。以下を提供する MfaPushPollingControl インスタンスを返します。
  • startPolling() — ポーリングを開始または再開します。
  • stopPolling() — ポーリングを直ちに停止します。
  • isRunning() — ポーリングが現在実行中かどうかを示します。
Example
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() は複数回呼び出しても安全です。すでに実行中の場合は効果がありません。
メソッドパラメーター
resendPushNotification
Promise<void>
このメソッドは、プッシュ通知を再送信します。
Example
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

const mfaPushChallengePush = new MfaPushChallengePush();
await mfaPushChallengePush.resendPushNotification();
メソッドパラメーター
tryAnotherMethod
Promise<void>
このメソッドを使用すると、ユーザーは別の MFA方式を試すことができます。
Example
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';

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