メインコンテンツへスキップ
サインアップID
Example
import SignupId from "@auth0/auth0-acul-js/signup-id";
const signupIdManager = new SignupId();
const { transaction } = signupIdManager;
//サインアップに必要な必須および任意の識別子を取得
const mandatoryIdentifier = transaction.getRequiredIdentifiers(); // 例: メール
const optionalIdentifiers = transaction.getOptionalIdentifiers() // 例: 電話番号
const signupParams = {
 email : "testEmail",
 phone : "+91923456789"
};
signupIdManager.signup(signupParams);

コンストラクター

SignupId
Constructor

プロパティ

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

メソッド

federatedSignup
Promise<void>

備考

このメソッドは、さまざまなソーシャル ID プロバイダーを利用したサインアップを処理します。 例: Google、Facebook など。
Example
import SignupId from "@auth0/auth0-acul-js/signup-id";

const signupIdManager = new SignupId();
const { transaction } = signupIdManager;

// ソーシャル接続を取得
const socialConnection = transaction.alternateConnections; // 例: "google-oauth2"

const signupParams = {
 connection : socialConnection[0].name, // "google-oauth2"
};

signupIdManager.federatedSignup(signupParams);
getErrors
コンテキストからトランザクションのエラー配列を取得します。存在しない場合は空配列を返します。トランザクションコンテキストから取得したエラーオブジェクトの配列です。
getSignupIdentifiers
Utility Featuresignup-id フォームで有効になっている識別子のリストを返します。 各識別子は、トランザクション設定に基づき必須か任意かがマークされます。識別子オブジェクトの配列(例: メール、電話番号、ユーザー名)。
Example
const signupId = new SignupId();
const identifiers = signupId.getSignupIdentifiers();
// [{ type: 'email', required: true }, { type: 'username', required: false }]
pickCountryCode
Promise<void>
Example
import SignupId from "@auth0/auth0-acul-js/signup-id";
const signupIdManager = new SignupId();

signupIdManager.pickCountryCode();
signup
Promise<void>

備考

このメソッドは signup-id に関連する設定を処理します。 さまざまな識別子を利用して新しいユーザーをサインアップできます。
Example
import SignupId from "@auth0/auth0-acul-js/signup-id";

const signupIdManager = new SignupId();
const { transaction } = signupIdManager;

// サインアップに必須および任意の識別子を取得
const mandatoryIdentifier = transaction.getRequiredIdentifiers(); // 例: email
const optionalIdentifiers = transaction.getOptionalIdentifiers() // 例: phone

const signupParams = {
 email : "testEmail",
 phone : "+91923456789"
};

signupIdManager.signup(signupParams);
validateUsername
Utility Featureトランザクションコンテキストで定義されている現在のユーザー名ポリシーに対して、 指定されたユーザー名を検証します。ユーザー名が有効かどうかと、その理由を示す結果オブジェクトを返します。
Example
const signupIdManager = new SignupId();
const result = signupIdManager.validateUsername('myusername');
// result => { valid: true, errors: [] }