Skip to main content
ResetPasswordMfaPhoneChallenge
Example
const screen = new ResetPasswordMfaPhoneChallenge();
try {
  await screen.continue({ type: 'sms' });
  // Redirects to code entry screen on success
} catch (error) {
  console.error("Failed to send SMS code:", error);
}

Constructors

ResetPasswordMfaPhoneChallenge
Constructor
Initializes a new instance of the ResetPasswordMfaPhoneChallenge class. It retrieves the screen context and sets up the screen-specific properties.

Throws

If the Universal Login Context is not available or if the screen name doesn’t match.

Properties

branding
client
Access to client-specific information (e.g., client ID, name).
organization
Access to organization-specific information, if applicable.
prompt
Access to prompt details (e.g., prompt name).
screen
Holds the specific screen data and properties, processed by ScreenOverride.
tenant
transaction
Access to the current transaction details (e.g., state, errors).
untrustedData
user
screenIdentifier
string
The unique identifier for this screen, used internally and for telemetry.

Methods

continue
Promise<void>
Sends the verification code to the user’s phone via the selected method (SMS or Voice). Corresponds to the ‘Continue’ action in the OpenAPI definition (action: ‘default’).A promise resolving upon successful submission to the server.

Throws

If the form submission fails.
Example
const screen = new ResetPasswordMfaPhoneChallenge();
try {
  await screen.continue({ type: 'sms' });
  // Redirects to code entry screen on success
} catch (error) {
  console.error("Failed to send SMS code:", error);
}
getErrors
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.
tryAnotherMethod
Promise<void>
Initiates the process for the user to select a different MFA authenticator. Corresponds to the ‘Try Another Method’ action in the OpenAPI definition (action: ‘pick-authenticator’).A promise resolving upon successful submission to the server.

Throws

If the form submission fails.
Example
const screen = new ResetPasswordMfaPhoneChallenge();
try {
  // Assuming the current screen was for SMS
  await screen.tryAnotherMethod({ type: 'sms' });
  // Redirects to authenticator selection screen on success
} catch (error) {
  console.error("Failed to switch MFA method:", error);
}