メインコンテンツへスキップ
Consent クラスは、consent 画面の機能を実装します。この画面では、要求された権限がユーザーに表示され、アクセスを許可するか拒否するかの選択を求めます。

コンストラクター

Consent画面マネージャーのインスタンスを作成します。
Example
import Consent from '@auth0/auth0-acul-js/consent';
const consentManager = new Consent();
await consentManager.accept();

プロパティ

ブランディングテーマや設定など、ブランディング関連の設定を提供します。
consent 画面向けに、idnamelogoUrl などのクライアント関連の設定を提供します。
idname など、ユーザーの組織に関する情報を提供します。
認証フロー内の現在のプロンプトに関するデータが含まれます。
要求されている scopes の一覧や hideScopes フラグなど、consent 画面に固有の詳細が含まれます。
id や関連するメタデータなど、テナントに関するデータが含まれます。
アクティブな識別子やフローの状態など、consent 画面のトランザクション固有のデータを提供します。
同意フロー中のユーザー入力など、SDK に渡される信頼できないデータを扱います。
usernameemailroles など、現在のユーザーの詳細です。

メソッド

accept
Promise<void>
このメソッドは、要求された権限を承認 (付与) するというユーザーの判断を送信します。
Example
import Consent from '@auth0/auth0-acul-js/consent';
const consentManager = new Consent();
await consentManager.accept();
changeLanguage
Promise<void>
このメソッドは、Universal Login ページの表示言語を変更します。
Example
import Consent from '@auth0/auth0-acul-js/consent';
const consentManager = new Consent();
consentManager.changeLanguage({
  language: 'fr',
});
メソッド パラメーター
deny
Promise<void>
このメソッドは、要求された権限を拒否 (却下) するというユーザーの判断を送信します。
Example
import Consent from '@auth0/auth0-acul-js/consent';
const consentManager = new Consent();
await consentManager.deny();
getErrors
このメソッドは、コンテキストからトランザクションエラーの配列を取得します。エラーが存在しない場合は、空の配列を返します。