Skip to main content
The LoginPasswordlessEmailCode class implements the login-passwordless-email-code screen functionality. This screen collects the user’s email and code.
Login Passwordless Email Code

Constructors

Create an instance of LoginPasswordlessEmailCode screen manager
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';

const loginPasswordlessEmailCode = new LoginPasswordlessEmailCode();
const { startResend } = loginPasswordlessEmailCode.resendManager({
  timeoutSeconds: 60,
  onStatusChange: (remainingSeconds, isDisabled) => {
    console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`);
  },
  onTimeout: () => {
    console.log('Resend is now available');
  }
});

// Call startResend when user clicks resend button
startResend();

Properties

branding
Provides branding-related configurations, such as branding theme and settings.
client
Provides client-related configurations, such as id, name, and logoUrl.
organization
Provides information about the user’s organization, such as organization id and name.
prompt
Contains data about the current prompt in the authentication flow.
screen
Contains details specific to the login-passwordless-email-code screen, including its configuration and context.
tenant
Contains data related to the tenant, such as id and associated metadata.
transaction
Provides transaction-specific data for the login-passwordless-email-code screen, such as active identifiers and flow states.
untrustedData
Handles untrusted data passed to the SDK, such as user input during login.
user
Details of the active user, including username, email, and roles.

Methods

getErrors
This method 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.
resendCode
(options ?)
This methods resends the code to the user’s email address.
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';

const loginPasswordlessEmailCode = new LoginPasswordlessEmailCode();
loginPasswordlessEmailCode.resendCode();
Method Parameters
resendManager
(options ?)
This method creates a resend control manager for handling email code resend operations. A ResendControl object with resend functionality and state management
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';

const loginPasswordlessEmailCode = new LoginPasswordlessEmailCode();
const { startResend } = loginPasswordlessEmailCode.resendManager({
  timeoutSeconds: 60,
  onStatusChange: (remainingSeconds, isDisabled) => {
    console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`);
  },
  onTimeout: () => {
    console.log('Resend is now available');
  }
});

// Call startResend when user clicks resend button
startResend();
Method Parameters
submitCode
(options ?)
This method continues the login process using email and code.
Example
//Creates an instance of LoginPasswordlessEmailCode and calls the method with sample data.
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';

//Method to continue the login process using email and code.
const loginPasswordlessEmailCode = new LoginPasswordlessEmailCode();
loginPasswordlessEmailCode.submitCode({
 email: "test@domain.com";
 code: "<string>";
});
Method Parameters