import SignupId from "@auth0/auth0-acul-js/signup-id" ;
const signupIdManager = new SignupId ();
const { transaction } = signupIdManager ;
//get mandatory & optional identifiers required for signup
const mandatoryIdentifier = transaction . getRequiredIdentifiers (); // eg: email
const optionalIdentifiers = transaction . getOptionalIdentifiers () // eg: phone
const signupParams = {
email : "testEmail" ,
phone : "+91923456789"
};
signupIdManager . signup ( signupParams );
Constructors
Properties
Methods
This methods handles allows signup via different social identifiers.
Eg: Google, Facebook etc. import SignupId from "@auth0/auth0-acul-js/signup-id" ;
const signupIdManager = new SignupId ();
const { transaction } = signupIdManager ;
//get social connections
const socialConnection = transaction . alternateConnections ; //eg: "google-oauth2"
const signupParams = {
connection : socialConnection [ 0 ]. name , // "google-oauth2"
};
signupIdManager . federatedSignup ( signupParams );
Retrieves the array of transaction errors from the context, or an empty array if none exist. An array of error objects from the transaction context.
Utility FeatureReturns the list of enabled identifiers for the signup-id form,
marking each as required or optional based on transaction config. Array of identifier objects (e.g., email, phone, username). const signupId = new SignupId ();
const identifiers = signupId . getSignupIdentifiers ();
// [{ type: 'email', required: true }, { type: 'username', required: false }]
import SignupId from "@auth0/auth0-acul-js/signup-id" ;
const signupIdManager = new SignupId ();
signupIdManager . pickCountryCode ();
This methods handles signup-id related configuration.
It allows to signup new users via different identifiers. import SignupId from "@auth0/auth0-acul-js/signup-id" ;
const signupIdManager = new SignupId ();
const { transaction } = signupIdManager ;
//get mandatory & optional identifiers required for signup
const mandatoryIdentifier = transaction . getRequiredIdentifiers (); // eg: email
const optionalIdentifiers = transaction . getOptionalIdentifiers () // eg: phone
const signupParams = {
email : "testEmail" ,
phone : "+91923456789"
};
signupIdManager . signup ( signupParams );
Utility FeatureValidates a given username against the current username policy
defined in the transaction context. Result object indicating whether the username is valid and why. const signupIdManager = new SignupId ();
const result = signupIdManager . validateUsername ( 'myusername' );
// result => { valid: true, errors: [] }
stringThe username string to validate.